CVE-2022-49738 Information
Description
In the Linux kernel the following vulnerability has been resolved:
f2fs: fix to do sanity check on i_extra_isize in is_alive()
syzbot found a f2fs bug:
BUG: KASAN: slab-out-of-bounds in data_blkaddr fs/f2fs/f2fs.h:2891 [inline] BUG: KASAN: slab-out-of-bounds in is_alive fs/f2fs/gc.c:1117 [inline] BUG: KASAN: slab-out-of-bounds in gc_data_segment fs/f2fs/gc.c:1520 [inline] BUG: KASAN: slab-out-of-bounds in do_garbage_collect+0x386a/0x3df0 fs/f2fs/gc.c:1734 Read of size 4 at addr ffff888076557568 by task kworker/u4:3/52
CPU: 1 PID: 52 Comm: kworker/u4:3 Not tainted 6.1.0-rc4-syzkaller-00362-gfef7fd48922d 0
Hardware name: Google Google Compute Engine/Google Compute Engine BIOS Google 10/26/2022
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
The root cause is that we forgot to do sanity check on .i_extra_isize in below path result in accessing invalid address later fix it.
- gc_data_segment
- is_alive
- data_blkaddr
- offset_in_addr
Reference
https://git.kernel.org/stable/c/5b25035fb888cb2f78bf0b9c9f95b1dc54480d36 https://git.kernel.org/stable/c/914e38f02a490dafd980ff0f39cccedc074deb29 https://git.kernel.org/stable/c/97ccfffcc061e54ce87e4a51a40e2e9cb0b7076a https://git.kernel.org/stable/c/d3b7b4afd6b2c344eabf9cc26b8bfa903c164c7c https://git.kernel.org/stable/c/e5142a4935c1f15841d06047b8130078fc4d7b8f
Share on: