kernel_samsung_a53x/drivers/char
Herbert Xu d851192f10 hwrng: core - Fix page fault dead lock on mmap-ed hwrng
commit 78aafb3884f6bc6636efcc1760c891c8500b9922 upstream.

There is a dead-lock in the hwrng device read path.  This triggers
when the user reads from /dev/hwrng into memory also mmap-ed from
/dev/hwrng.  The resulting page fault triggers a recursive read
which then dead-locks.

Fix this by using a stack buffer when calling copy_to_user.

Reported-by: Edward Adam Davis <eadavis@qq.com>
Reported-by: syzbot+c52ab18308964d248092@syzkaller.appspotmail.com
Fixes: 9996508b3353 ("hwrng: core - Replace u32 in driver API with byte array")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:12:55 +01:00
..
agp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw_random hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-11-18 12:12:55 +01:00
ipmi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mwave Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_hwicap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xillybus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apm-emulation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applicom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applicom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bsr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds1620.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dsp56k.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dtlk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hangcheck-timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mspec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsc_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwbutton.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwbutton.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwflash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pc8736x_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
powernv-op-panel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3flash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
random.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scx200_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonypi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tb0219.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlclk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
toshiba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ttyprintk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uv_mmtimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_console.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00