[syzbot] [netfilter?] KASAN: slab-out-of-bounds Read in bitmap_ip_add (2)

11 views
Skip to first unread message

syzbot

unread,
Nov 11, 2024, 10:25:30ā€ÆPMĀ (9 days ago)Ā Nov 11
to core...@netfilter.org, da...@davemloft.net, edum...@google.com, ho...@kernel.org, kad...@netfilter.org, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, netfilt...@vger.kernel.org, pab...@redhat.com, pa...@netfilter.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 906bd684e4b1 Merge tag 'spi-fix-v6.12-rc6' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1068035f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=64aa0d9945bd5c1
dashboard link: https://syzkaller.appspot.com/bug?extid=58c872f7790a4d2ac951
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=1468035f980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=105b6e30580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-906bd684.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/88c5c4ba7e33/vmlinux-906bd684.xz
kernel image: https://storage.googleapis.com/syzbot-assets/07094e69f47b/bzImage-906bd684.xz

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

==================================================================
BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: slab-out-of-bounds in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
BUG: KASAN: slab-out-of-bounds in bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline]
BUG: KASAN: slab-out-of-bounds in bitmap_ip_add+0xdf/0x8d0 net/netfilter/ipset/ip_set_bitmap_gen.h:136
Read of size 8 at addr ffff888032b3df08 by task syz-executor701/5308

CPU: 0 UID: 0 PID: 5308 Comm: syz-executor701 Not tainted 6.12.0-rc6-syzkaller-00169-g906bd684e4b1 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
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:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
instrument_atomic_read include/linux/instrumented.h:68 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline]
bitmap_ip_add+0xdf/0x8d0 net/netfilter/ipset/ip_set_bitmap_gen.h:136
bitmap_ip_uadt+0x78a/0xbb0 net/netfilter/ipset/ip_set_bitmap_ip.c:186
call_ad+0x279/0xa70 net/netfilter/ipset/ip_set_core.c:1746
ip_set_ad+0x7e0/0x990 net/netfilter/ipset/ip_set_core.c:1836
nfnetlink_rcv_msg+0xbec/0x1180 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2551
nfnetlink_rcv+0x297/0x2ab0 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:729 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:744
____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607
___sys_sendmsg net/socket.c:2661 [inline]
__sys_sendmsg+0x292/0x380 net/socket.c:2690
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa0f44fcdf9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe08129638 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa0f44fcdf9
RDX: 0000000004000050 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 0000000000003a28 R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
</TASK>

Allocated by task 5308:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:257 [inline]
__do_kmalloc_node mm/slub.c:4264 [inline]
__kmalloc_noprof+0x1fc/0x400 mm/slub.c:4276
init_map_ip net/netfilter/ipset/ip_set_bitmap_ip.c:223 [inline]
bitmap_ip_create+0x565/0xc00 net/netfilter/ipset/ip_set_bitmap_ip.c:327
ip_set_create+0xa5c/0x1900 net/netfilter/ipset/ip_set_core.c:1104
nfnetlink_rcv_msg+0xbec/0x1180 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2551
nfnetlink_rcv+0x297/0x2ab0 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:729 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:744
____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607
___sys_sendmsg net/socket.c:2661 [inline]
__sys_sendmsg+0x292/0x380 net/socket.c:2690
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888032b3df00
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes to the right of
allocated 8-byte region [ffff888032b3df00, ffff888032b3df08)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32b3d
anon flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000000 ffff88801ac41500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 3971426165, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537
prep_new_page mm/page_alloc.c:1545 [inline]
get_page_from_freelist+0x303f/0x3190 mm/page_alloc.c:3457
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4733
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
alloc_slab_page+0x6a/0x140 mm/slub.c:2412
allocate_slab+0x5a/0x2f0 mm/slub.c:2578
new_slab mm/slub.c:2631 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818
__slab_alloc+0x58/0xa0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__do_kmalloc_node mm/slub.c:4263 [inline]
__kmalloc_noprof+0x25a/0x400 mm/slub.c:4276
kmalloc_noprof include/linux/slab.h:882 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
acpi_ns_internalize_name+0x419/0x610 drivers/acpi/acpica/nsutils.c:331
acpi_ns_get_node_unlocked drivers/acpi/acpica/nsutils.c:666 [inline]
acpi_ns_get_node+0x1b7/0x3c0 drivers/acpi/acpica/nsutils.c:726
acpi_ns_evaluate+0x35f/0xa40 drivers/acpi/acpica/nseval.c:62
acpi_evaluate_object+0x59b/0xaf0 drivers/acpi/acpica/nsxfeval.c:354
acpi_evaluate_dsm drivers/acpi/utils.c:798 [inline]
acpi_check_dsm+0x296/0x850 drivers/acpi/utils.c:831
device_has_acpi_name drivers/pci/pci-label.c:44 [inline]
acpi_attr_is_visible+0x8b/0xf0 drivers/pci/pci-label.c:221
create_files fs/sysfs/group.c:65 [inline]
internal_create_group+0x714/0x11d0 fs/sysfs/group.c:180
page_owner free stack trace missing

Memory state around the buggy address:
ffff888032b3de00: 00 fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
ffff888032b3de80: 07 fc fc fc 07 fc fc fc fa fc fc fc 00 fc fc fc
>ffff888032b3df00: 00 fc fc fc fa fc fc fc 00 fc fc fc 00 fc fc fc
^
ffff888032b3df80: 00 fc fc fc 06 fc fc fc 06 fc fc fc 04 fc fc fc
ffff888032b3e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
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.

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

Edward Adam Davis

unread,
Nov 12, 2024, 4:19:59ā€ÆAMĀ (9 days ago)Ā Nov 12
to syzbot+58c872...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
the value of first_ip or netmask are incorrect ?

#syz test

diff --git a/net/netfilter/ipset/ip_set_bitmap_ip.c b/net/netfilter/ipset/ip_set_bitmap_ip.c
index e4fa00abde6a..0fe17fba3b86 100644
--- a/net/netfilter/ipset/ip_set_bitmap_ip.c
+++ b/net/netfilter/ipset/ip_set_bitmap_ip.c
@@ -183,6 +183,10 @@ bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[],

for (; !before(ip_to, ip); ip += map->hosts) {
e.id = ip_to_id(map, ip);
+ printk("mnm: %u, firstip: %u, hosts: %u, id: %u, %s\n", (ip & ip_set_hostmask(map->netmask)), map->first_ip, map->hosts, ei.id, __func__);
+ if (ip & ip_set_hostmask(map->netmask) < map->first_ip)
+ continue;
+
ret = adtfn(set, &e, &ext, &ext, flags);

if (ret && !ip_set_eexist(ret, flags))

syzbot

unread,
Nov 12, 2024, 4:27:05ā€ÆAMĀ (9 days ago)Ā Nov 12
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

net/netfilter/ipset/ip_set_bitmap_ip.c:186:125: error: use of undeclared identifier 'ei'


Tested on:

commit: 2d5404ca Linux 6.12-rc7
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=64aa0d9945bd5c1
dashboard link: https://syzkaller.appspot.com/bug?extid=58c872f7790a4d2ac951
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=128178c0580000

Edward Adam Davis

unread,
Nov 12, 2024, 5:58:13ā€ÆAMĀ (9 days ago)Ā Nov 12
to syzbot+58c872...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
the value of first_ip or netmask are incorrect ?

#syz test

diff --git a/net/netfilter/ipset/ip_set_bitmap_ip.c b/net/netfilter/ipset/ip_set_bitmap_ip.c
index e4fa00abde6a..0fe17fba3b86 100644
--- a/net/netfilter/ipset/ip_set_bitmap_ip.c
+++ b/net/netfilter/ipset/ip_set_bitmap_ip.c
@@ -183,6 +183,10 @@ bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[],

for (; !before(ip_to, ip); ip += map->hosts) {
e.id = ip_to_id(map, ip);
+ printk("mnm: %u, firstip: %u, hosts: %u, id: %u, %s\n", (ip & ip_set_hostmask(map->netmask)), map->first_ip, map->hosts, e.id, __func__);

syzbot

unread,
Nov 12, 2024, 6:17:04ā€ÆAMĀ (9 days ago)Ā Nov 12
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: slab-out-of-bounds Read in bitmap_ip_add

mnm: 3758096445, firstip: 4294967294, hosts: 1, id: 63, bitmap_ip_uadt
mnm: 3758096446, firstip: 4294967294, hosts: 1, id: 64, bitmap_ip_uadt
==================================================================
BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: slab-out-of-bounds in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
BUG: KASAN: slab-out-of-bounds in bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline]
BUG: KASAN: slab-out-of-bounds in bitmap_ip_add+0xdf/0x8d0 net/netfilter/ipset/ip_set_bitmap_gen.h:136
Read of size 8 at addr ffff88803af55ea8 by task syz.0.15/5831

CPU: 0 UID: 0 PID: 5831 Comm: syz.0.15 Not tainted 6.12.0-rc7-syzkaller-g2d5404caa8c7-dirty #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
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:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
instrument_atomic_read include/linux/instrumented.h:68 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline]
bitmap_ip_add+0xdf/0x8d0 net/netfilter/ipset/ip_set_bitmap_gen.h:136
bitmap_ip_uadt+0x822/0xcd0 net/netfilter/ipset/ip_set_bitmap_ip.c:190
call_ad+0x279/0xa70 net/netfilter/ipset/ip_set_core.c:1746
ip_set_ad+0x7e0/0x990 net/netfilter/ipset/ip_set_core.c:1836
nfnetlink_rcv_msg+0xbec/0x1180 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2551
nfnetlink_rcv+0x297/0x2ab0 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:729 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:744
____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607
___sys_sendmsg net/socket.c:2661 [inline]
__sys_sendmsg+0x292/0x380 net/socket.c:2690
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f788537e719
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f78860c5038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f7885535f80 RCX: 00007f788537e719
RDX: 0000000004000050 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 00007f78853f139e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f7885535f80 R15: 00007ffed81733b8
</TASK>

Allocated by task 5831:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:257 [inline]
__do_kmalloc_node mm/slub.c:4264 [inline]
__kmalloc_noprof+0x1fc/0x400 mm/slub.c:4276
init_map_ip net/netfilter/ipset/ip_set_bitmap_ip.c:227 [inline]
bitmap_ip_create+0x565/0xc00 net/netfilter/ipset/ip_set_bitmap_ip.c:331
ip_set_create+0xa5c/0x1900 net/netfilter/ipset/ip_set_core.c:1104
nfnetlink_rcv_msg+0xbec/0x1180 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2551
nfnetlink_rcv+0x297/0x2ab0 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:729 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:744
____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607
___sys_sendmsg net/socket.c:2661 [inline]
__sys_sendmsg+0x292/0x380 net/socket.c:2690
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88803af55ea0
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes to the right of
allocated 8-byte region [ffff88803af55ea0, ffff88803af55ea8)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3af55
flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000000 ffff88801ac41500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5629, tgid 5629 (syz-executor), ts 115225398503, free_ts 115224439532
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1541
prep_new_page mm/page_alloc.c:1549 [inline]
get_page_from_freelist+0x3649/0x3790 mm/page_alloc.c:3459
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4735
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
alloc_slab_page+0x6a/0x140 mm/slub.c:2412
allocate_slab+0x5a/0x2f0 mm/slub.c:2578
new_slab mm/slub.c:2631 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818
__slab_alloc+0x58/0xa0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__do_kmalloc_node mm/slub.c:4263 [inline]
__kmalloc_noprof+0x25a/0x400 mm/slub.c:4276
kmalloc_noprof include/linux/slab.h:882 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
lsm_blob_alloc security/security.c:685 [inline]
lsm_superblock_alloc security/security.c:863 [inline]
security_sb_alloc+0x45/0x320 security/security.c:1404
alloc_super+0x229/0x9d0 fs/super.c:346
sget_fc+0x34c/0x9c0 fs/super.c:760
vfs_get_super fs/super.c:1275 [inline]
get_tree_nodev+0x2a/0x140 fs/super.c:1299
vfs_get_tree+0x90/0x2b0 fs/super.c:1814
do_new_mount+0x2be/0xb40 fs/namespace.c:3507
do_mount fs/namespace.c:3847 [inline]
__do_sys_mount fs/namespace.c:4057 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034
page last free pid 5629 tgid 5629 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1112 [inline]
free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2642
__slab_free+0x31b/0x3d0 mm/slub.c:4490
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:247 [inline]
slab_post_alloc_hook mm/slub.c:4085 [inline]
slab_alloc_node mm/slub.c:4134 [inline]
kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4141
getname_flags+0xb7/0x540 fs/namei.c:139
user_path_at+0x24/0x60 fs/namei.c:3015
__do_sys_chdir fs/open.c:561 [inline]
__se_sys_chdir+0xbc/0x220 fs/open.c:555
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
ffff88803af55d80: 00 fc fc fc 00 fc fc fc fa fc fc fc fa fc fc fc
ffff88803af55e00: fa fc fc fc fa fc fc fc fa fc fc fc 00 fc fc fc
>ffff88803af55e80: fa fc fc fc 00 fc fc fc 00 fc fc fc fa fc fc fc
^
ffff88803af55f00: fa fc fc fc 00 fc fc fc fa fc fc fc 00 fc fc fc
ffff88803af55f80: fa fc fc fc fa fc fc fc 05 fc fc fc 00 fc fc fc
==================================================================


Tested on:

commit: 2d5404ca Linux 6.12-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14740ce8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d2aeec8c0b2e420c
dashboard link: https://syzkaller.appspot.com/bug?extid=58c872f7790a4d2ac951
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=112378c0580000

Reply all
Reply to author
Forward
0 new messages