lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <67972800-CD21-4A3E-B4E5-0FDFD7B83D44@gmail.com>
Date: Sat, 8 Mar 2025 01:06:02 +0800
From: Alan Huang <mmpgouride@...il.com>
To: syzbot <syzbot+b9d9de2aa46b1bbe575a@...kaller.appspotmail.com>
Cc: kent.overstreet@...ux.dev,
 linux-bcachefs@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bcachefs?] KASAN: slab-out-of-bounds Read in
 __bch2_bkey_unpack_key

On Mar 7, 2025, at 01:57, syzbot <syzbot+b9d9de2aa46b1bbe575a@...kaller.appspotmail.com> wrote:
> 
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    99fa936e8e4f Merge tag 'affs-6.14-rc5-tag' of git://git.ke..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11f08078580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=2040405600e83619
> dashboard link: https://syzkaller.appspot.com/bug?extid=b9d9de2aa46b1bbe575a
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13b69464580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15f08078580000
> 
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-99fa936e.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/ef04f83d96f6/vmlinux-99fa936e.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/583a7eea5c8e/bzImage-99fa936e.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/4d401321a7e1/mount_6.gz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+b9d9de2aa46b1bbe575a@...kaller.appspotmail.com
> 
>  u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c6c25c03258c59c5 written 48 min_key 0:36028797018963968:0 durability: 1 ptr: 0:27:0 gen 0  
>  node offset 8/48 bset u64s 2088 bset byte offset 360: bad k->u64s 0 (min 3 max 253), fixing
> ==================================================================
> BUG: KASAN: slab-out-of-bounds in unpack_state_init fs/bcachefs/bkey.c:151 [inline]
> BUG: KASAN: slab-out-of-bounds in __bch2_bkey_unpack_key+0x66/0xdd0 fs/bcachefs/bkey.c:269
> Read of size 8 at addr ffff888053574140 by task kworker/0:1H/36
> 
> CPU: 0 UID: 0 PID: 36 Comm: kworker/0:1H Not tainted 6.14.0-rc5-syzkaller-00013-g99fa936e8e4f #0
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
> Workqueue: bcachefs_btree_read_complete btree_node_read_work
> Call Trace:
> <TASK>
> __dump_stack lib/dump_stack.c:94 [inline]
> dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
> print_address_description mm/kasan/report.c:408 [inline]
> print_report+0x16e/0x5b0 mm/kasan/report.c:521
> kasan_report+0x143/0x180 mm/kasan/report.c:634
> unpack_state_init fs/bcachefs/bkey.c:151 [inline]
> __bch2_bkey_unpack_key+0x66/0xdd0 fs/bcachefs/bkey.c:269
> __bkey_unpack_key_format_checked fs/bcachefs/bkey.h:407 [inline]
> __bkey_unpack_key fs/bcachefs/bkey.h:426 [inline]
> __bkey_disassemble fs/bcachefs/bkey.h:477 [inline]
> bkey_packed_valid+0x21e/0x6c0 fs/bcachefs/btree_io.c:875
> validate_bset_keys+0xeb5/0x1af0 fs/bcachefs/btree_io.c:987
> bch2_btree_node_read_done+0x2298/0x6180 fs/bcachefs/btree_io.c:1164
> btree_node_read_work+0x6dc/0x1380 fs/bcachefs/btree_io.c:1358
> process_one_work kernel/workqueue.c:3238 [inline]
> process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
> worker_thread+0x870/0xd30 kernel/workqueue.c:3400
> kthread+0x7a9/0x920 kernel/kthread.c:464
> ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
> ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
> </TASK>
> 
> Last potentially related work creation:
> ------------[ cut here ]------------
> pool index 16319 out of bounds (797) for stack id 9a6c3fc0
> WARNING: CPU: 0 PID: 36 at lib/stackdepot.c:452 depot_fetch_stack+0x86/0xc0 lib/stackdepot.c:451
> Modules linked in:
> CPU: 0 UID: 0 PID: 36 Comm: kworker/0:1H Not tainted 6.14.0-rc5-syzkaller-00013-g99fa936e8e4f #0
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
> Workqueue: bcachefs_btree_read_complete btree_node_read_work
> RIP: 0010:depot_fetch_stack+0x86/0xc0 lib/stackdepot.c:451
> Code: 83 7c 18 1c 00 74 38 48 01 d8 eb 24 90 0f 0b 90 44 39 f5 72 ca 90 48 c7 c7 63 fc 3a 8e 89 ee 44 89 f2 89 d9 e8 ab e2 53 fc 90 <0f> 0b 90 90 31 c0 5b 41 5e 5d c3 cc cc cc cc 90 0f 0b 90 eb ef 90
> RSP: 0000:ffffc90000576d08 EFLAGS: 00010046
> RAX: a98b856e26fe2600 RBX: 000000009a6c3fc0 RCX: ffff88801e00c880
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
> RBP: 0000000000003fbf R08: ffffffff81817e32 R09: 1ffff11003f8519a
> R10: dffffc0000000000 R11: ffffed1003f8519b R12: ffff888053574140
> R13: ffffea00014d5d00 R14: 000000000000031d R15: ffffc90000576de0
> FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007fabca6ea000 CR3: 0000000012240000 CR4: 0000000000352ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> stack_depot_fetch lib/stackdepot.c:714 [inline]
> stack_depot_print+0x16/0x50 lib/stackdepot.c:752
> kasan_print_aux_stacks+0x38/0x70 mm/kasan/report_generic.c:199
> describe_object_stacks mm/kasan/report.c:347 [inline]
> describe_object mm/kasan/report.c:353 [inline]
> print_address_description mm/kasan/report.c:412 [inline]
> print_report+0x22b/0x5b0 mm/kasan/report.c:521
> kasan_report+0x143/0x180 mm/kasan/report.c:634
> unpack_state_init fs/bcachefs/bkey.c:151 [inline]
> __bch2_bkey_unpack_key+0x66/0xdd0 fs/bcachefs/bkey.c:269
> __bkey_unpack_key_format_checked fs/bcachefs/bkey.h:407 [inline]
> __bkey_unpack_key fs/bcachefs/bkey.h:426 [inline]
> __bkey_disassemble fs/bcachefs/bkey.h:477 [inline]
> bkey_packed_valid+0x21e/0x6c0 fs/bcachefs/btree_io.c:875
> validate_bset_keys+0xeb5/0x1af0 fs/bcachefs/btree_io.c:987
> bch2_btree_node_read_done+0x2298/0x6180 fs/bcachefs/btree_io.c:1164
> btree_node_read_work+0x6dc/0x1380 fs/bcachefs/btree_io.c:1358
> process_one_work kernel/workqueue.c:3238 [inline]
> process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
> worker_thread+0x870/0xd30 kernel/workqueue.c:3400
> kthread+0x7a9/0x920 kernel/kthread.c:464
> ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
> ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
> </TASK>
> 
> 
> ---
> 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 syzkaller@...glegroups.com.
> 
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> 
> If the report is already addressed, let syzbot know by replying with:
> #syz fix: exact-commit-title
> 
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.
> 
> If you want to overwrite report's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
> 
> If the report is a duplicate of another one, reply with:
> #syz dup: exact-subject-of-another-report
> 
> If you want to undo deduplication, reply with:
> #syz undup
> 

#syz test: https://github.com/alanskind/bcachefs 47e4e14a59ecffbec0025733f1980d23b1a7c7ef



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ