kernel_samsung_a53x/drivers/char/hw_random
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
..
amd-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ba431-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm2835-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cavium-rng-vf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cavium-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cctrng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cctrng.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-11-18 12:12:55 +01:00
exynos-trng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exyswd-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
geode-rng.c hwrng: geode - fix accessing registers 2024-11-18 11:43:02 +01:00
hisi-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hisi-trng-v2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-rngc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic-trng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iproc-rng200.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ixp4xx-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ks-sa-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxc-rnga.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n2-asm.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n2-drv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n2rng.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nomadik-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
npcm-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
octeon-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap3-rom-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
optee-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pasemi-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
powernv-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pseries-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s390-trng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timeriomem-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tx4939-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xgene-rng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xiphera-trng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00