mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-04 20:48:40 +00:00
A contrived zero-length write, for example, by using write(2):
...
ret = write(fd, str, 0);
...
to the "flags" file causes:
BUG: KASAN: stack-out-of-bounds in flags_write
Write of size 1 at addr ffff888019be7ddf by task writefile/3787
CPU: 4 PID: 3787 Comm: writefile Not tainted 5.16.0-rc7+ #12
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
due to accessing buf one char before its start.
Prevent such out-of-bounds access.
[ bp: Productize into a proper patch. Link below is the next best
thing because the original mail didn't get archived on lore. ]
Fixes:
|
||
|---|---|---|
| .. | ||
| amd.c | ||
| apei.c | ||
| core.c | ||
| dev-mcelog.c | ||
| genpool.c | ||
| inject.c | ||
| intel.c | ||
| internal.h | ||
| Makefile | ||
| p5.c | ||
| severity.c | ||
| threshold.c | ||
| winchip.c | ||