KASAN: use-after-free Read in dbJoin

10 views
Skip to first unread message

syzbot

unread,
Sep 26, 2022, 3:12:51 AM9/26/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4edbf74132a4 Linux 4.14.294
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14628d60880000
kernel config: https://syzkaller.appspot.com/x/.config?x=94d4cf9c4e23980f
dashboard link: https://syzkaller.appspot.com/bug?extid=38cb1c06812b2affa808
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13dce250880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16e440d4880000

Downloadable assets:
disk image: https://storage.googleapis.com/b40da19b4827/disk-4edbf741.raw.xz
vmlinux: https://storage.googleapis.com/a36e39677c18/vmlinux-4edbf741.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+38cb1c...@syzkaller.appspotmail.com

IPVS: ftp: loaded support on port[0] = 21
==================================================================
BUG: KASAN: use-after-free in dbJoin+0x1ee/0x200 fs/jfs/jfs_dmap.c:2849
Read of size 1 at addr ffff8881a91f7a4c by task jfsCommit/1963

CPU: 1 PID: 1963 Comm: jfsCommit Not tainted 4.14.294-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x281 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427
dbJoin+0x1ee/0x200 fs/jfs/jfs_dmap.c:2849
dbFreeBits+0xd4/0x660 fs/jfs/jfs_dmap.c:2386
dbFreeDmap+0x61/0x180 fs/jfs/jfs_dmap.c:2135
dbFree+0x20c/0x4b0 fs/jfs/jfs_dmap.c:392
txFreeMap+0x691/0xa00 fs/jfs/jfs_txnmgr.c:2579
txUpdateMap+0x2e3/0xe30 fs/jfs/jfs_txnmgr.c:2375
txLazyCommit fs/jfs/jfs_txnmgr.c:2709 [inline]
jfs_lazycommit+0x48b/0x8c0 fs/jfs/jfs_txnmgr.c:2777
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

The buggy address belongs to the page:
page:ffffea0006a47dc0 count:0 mapcount:0 mapping: (null) index:0x0
flags: 0x57ff00000000000()
raw: 057ff00000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: ffffea0006a47de0 ffffea0006a47de0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8881a91f7900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881a91f7980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881a91f7a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881a91f7a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881a91f7b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Sep 26, 2022, 11:15:44 AM9/26/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16dacdef080000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=f3743df63ec0391008ff
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=153105c4880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15e97b18880000

Downloadable assets:
disk image: https://storage.googleapis.com/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/ea228ff02669/vmlinux-3f8a27f9.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f3743d...@syzkaller.appspotmail.com

IPVS: ftp: loaded support on port[0] = 21
==================================================================
BUG: KASAN: use-after-free in dbJoin+0x21b/0x220 fs/jfs/jfs_dmap.c:2841
Read of size 1 at addr ffff88819c47fa4c by task jfsCommit/1986

CPU: 0 PID: 1986 Comm: jfsCommit Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report mm/kasan/report.c:412 [inline]
__asan_report_load1_noabort+0x88/0x90 mm/kasan/report.c:430
dbJoin+0x21b/0x220 fs/jfs/jfs_dmap.c:2841
dbFreeBits+0xf0/0x710 fs/jfs/jfs_dmap.c:2378
dbFreeDmap+0x61/0x1a0 fs/jfs/jfs_dmap.c:2127
dbFree+0x252/0x500 fs/jfs/jfs_dmap.c:385
txFreeMap+0x7a4/0xb20 fs/jfs/jfs_txnmgr.c:2579
txUpdateMap+0x369/0x1000 fs/jfs/jfs_txnmgr.c:2375
txLazyCommit fs/jfs/jfs_txnmgr.c:2709 [inline]
jfs_lazycommit+0x525/0x9d0 fs/jfs/jfs_txnmgr.c:2777
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

The buggy address belongs to the page:
page:ffffea0006711fc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x57ff00000000000()
raw: 057ff00000000000 ffffea0006711fc8 ffffea0006711fc8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88819c47f900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88819c47f980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88819c47fa00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88819c47fa80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88819c47fb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Reply all
Reply to author
Forward
0 new messages