syzbot has found a reproducer for the following issue on:
HEAD commit: a456e1743881 Linux 6.1.39
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14d9f00ca80000
kernel config:
https://syzkaller.appspot.com/x/.config?x=ab4166c71cf155ea
dashboard link:
https://syzkaller.appspot.com/bug?extid=e8f9034a130a66a2b351
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=1052986ea80000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/e4a94ce282ec/disk-a456e174.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/7442cb7a697f/vmlinux-a456e174.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/f51a327db171/bzImage-a456e174.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/c379268e81d6/mount_0.gz
BUG: KASAN: double-free in diUnmount+0xef/0x100 fs/jfs/jfs_imap.c:195
Free of addr ffff88807f2b8000 by task syz-executor.2/3578
CPU: 0 PID: 3578 Comm: syz-executor.2 Not tainted 6.1.39-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_address_description mm/kasan/report.c:284 [inline]
print_report+0x15f/0x4f0 mm/kasan/report.c:395
kasan_report_invalid_free+0x10c/0x130 mm/kasan/report.c:460
____kasan_slab_free+0xfb/0x120
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674
diUnmount+0xef/0x100 fs/jfs/jfs_imap.c:195
jfs_umount+0x109/0x370 fs/jfs/jfs_umount.c:63
jfs_put_super+0x86/0x180 fs/jfs/super.c:194
generic_shutdown_super+0x130/0x340 fs/super.c:501
kill_block_super+0x7a/0xe0 fs/super.c:1450
deactivate_locked_super+0xa0/0x110 fs/super.c:332
cleanup_mnt+0x490/0x520 fs/namespace.c:1186
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fb14447de57
Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffd012159f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fb14447de57
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffd01215ab0
RBP: 00007ffd01215ab0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffd01216b70
R13: 00007fb1444c73b9 R14: 000000000001d901 R15: 0000000000000005
</TASK>
Allocated by task 3642:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
__do_kmalloc_node mm/slab_common.c:955 [inline]
__kmalloc_node_track_caller+0xb1/0x220 mm/slab_common.c:975
kmalloc_reserve net/core/skbuff.c:437 [inline]
__alloc_skb+0x130/0x620 net/core/skbuff.c:510
alloc_skb include/linux/skbuff.h:1268 [inline]
alloc_skb_with_frags+0xa4/0x740 net/core/skbuff.c:6143
sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2726
sock_alloc_send_skb include/net/sock.h:1896 [inline]
mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748
add_grhead net/ipv6/mcast.c:1851 [inline]
add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1989
mld_send_cr net/ipv6/mcast.c:2115 [inline]
mld_ifc_work+0x68f/0xc90 net/ipv6/mcast.c:2653
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
Freed by task 3642:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674
skb_free_head net/core/skbuff.c:760 [inline]
skb_release_data+0x5de/0x7a0 net/core/skbuff.c:789
skb_release_all net/core/skbuff.c:854 [inline]
__kfree_skb net/core/skbuff.c:868 [inline]
kfree_skb_reason+0x16f/0x390 net/core/skbuff.c:891
kfree_skb include/linux/skbuff.h:1217 [inline]
ip6_mc_input+0x980/0xb80 net/ipv6/ip6_input.c:588
NF_HOOK+0x364/0x410 include/linux/netfilter.h:302
__netif_receive_skb_one_core net/core/dev.c:5496 [inline]
__netif_receive_skb+0x1c6/0x530 net/core/dev.c:5610
process_backlog+0x347/0x700 net/core/dev.c:5938
__napi_poll+0xc7/0x470 net/core/dev.c:6505
napi_poll net/core/dev.c:6572 [inline]
net_rx_action+0x70f/0xeb0 net/core/dev.c:6683
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
The buggy address belongs to the object at ffff88807f2b8000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 0 bytes inside of
2048-byte region [ffff88807f2b8000, ffff88807f2b8800)
The buggy address belongs to the physical page:
page:ffffea0001fcae00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7f2b8
head:ffffea0001fcae00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888012442000
raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3642, tgid 3642 (kworker/0:8), ts 122045325965, free_ts 122027212821
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533
prep_new_page mm/page_alloc.c:2540 [inline]
get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292
__alloc_pages+0x28d/0x770 mm/page_alloc.c:5559
alloc_slab_page+0x6a/0x150 mm/slub.c:1794
allocate_slab mm/slub.c:1939 [inline]
new_slab+0x84/0x2d0 mm/slub.c:1992
___slab_alloc+0xa71/0x1080 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
slab_alloc_node mm/slub.c:3364 [inline]
__kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437
__do_kmalloc_node mm/slab_common.c:954 [inline]
__kmalloc_node_track_caller+0xa0/0x220 mm/slab_common.c:975
kmalloc_reserve net/core/skbuff.c:437 [inline]
__alloc_skb+0x130/0x620 net/core/skbuff.c:510
alloc_skb include/linux/skbuff.h:1268 [inline]
alloc_skb_with_frags+0xa4/0x740 net/core/skbuff.c:6143
sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2726
sock_alloc_send_skb include/net/sock.h:1896 [inline]
mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748
add_grhead net/ipv6/mcast.c:1851 [inline]
add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1989
mld_send_cr net/ipv6/mcast.c:2115 [inline]
mld_ifc_work+0x68f/0xc90 net/ipv6/mcast.c:2653
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1460 [inline]
free_pcp_prepare mm/page_alloc.c:1510 [inline]
free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388
free_unref_page+0x98/0x570 mm/page_alloc.c:3484
free_large_kmalloc+0xfb/0x190 mm/slab_common.c:932
diMount+0x653/0x870 fs/jfs/jfs_imap.c:115
jfs_mount_rw+0x307/0x640 fs/jfs/jfs_mount.c:238
jfs_remount+0x3cd/0x6a0 fs/jfs/super.c:454
reconfigure_super+0x3c5/0x7c0 fs/super.c:957
vfs_fsconfig_locked fs/fsopen.c:254 [inline]
__do_sys_fsconfig fs/fsopen.c:439 [inline]
__se_sys_fsconfig+0x98b/0xec0 fs/fsopen.c:314
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffff88807f2b7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807f2b7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807f2b8000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807f2b8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807f2b8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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.