Hello,
syzbot found the following issue on:
HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=120a83a4580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d302c69e93fb6774
dashboard link:
https://syzkaller.appspot.com/bug?extid=48001dd6a282f0344f64
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/267e46ee7273/disk-c16c81c8.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/944e289206cf/vmlinux-c16c81c8.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/f8cadf62458e/bzImage-c16c81c8.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+48001d...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline]
BUG: KASAN: use-after-free in __refcount_sub_and_test include/linux/refcount.h:272 [inline]
BUG: KASAN: use-after-free in __refcount_dec_and_test include/linux/refcount.h:315 [inline]
BUG: KASAN: use-after-free in refcount_dec_and_test include/linux/refcount.h:333 [inline]
BUG: KASAN: use-after-free in ax25_dev_put include/net/ax25.h:301 [inline]
BUG: KASAN: use-after-free in ax25_dev_device_down+0x356/0x510 net/ax25/ax25_dev.c:122
Write of size 4 at addr ffff88805f64eeb8 by task syz.2.55/4509
CPU: 1 PID: 4509 Comm: syz.2.55 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
print_address_description+0x63/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189
instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline]
__refcount_sub_and_test include/linux/refcount.h:272 [inline]
__refcount_dec_and_test include/linux/refcount.h:315 [inline]
refcount_dec_and_test include/linux/refcount.h:333 [inline]
ax25_dev_put include/net/ax25.h:301 [inline]
ax25_dev_device_down+0x356/0x510 net/ax25/ax25_dev.c:122
ax25_device_event+0x4d1/0x500 net/ax25/af_ax25.c:144
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bpq_device_event+0x3c3/0x9d0 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bond_setup_by_slave+0x66/0x390 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x7b1/0x3c20 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x2a1/0xb40 drivers/net/bonding/bond_main.c:4238
dev_ifsioc+0xd7a/0x10c0 net/core/dev_ioctl.c:417
dev_ioctl+0x504/0xf60 net/core/dev_ioctl.c:587
sock_do_ioctl+0x34f/0x5a0 net/socket.c:1154
sock_ioctl+0x47f/0x770 net/socket.c:1257
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f187f3e6de9
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:00007f187d250038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f187f5fffa0 RCX: 00007f187f3e6de9
RDX: 0000400000000180 RSI: 0000000000008990 RDI: 0000000000000004
RBP: 00007f187f4682a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f187f5fffa0 R15: 00007ffe12dd30a8
</TASK>
Allocated by task 4253:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
kasan_kmalloc include/linux/kasan.h:264 [inline]
kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
ax25_dev_device_up+0x51/0x5a0 net/ax25/ax25_dev.c:55
ax25_device_event+0x49b/0x500 net/ax25/af_ax25.c:139
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
__dev_notify_flags+0x304/0x610
dev_change_flags+0xe7/0x190 net/core/dev.c:8897
dev_ifsioc+0x147/0x10c0 net/core/dev_ioctl.c:324
dev_ioctl+0x504/0xf60 net/core/dev_ioctl.c:587
sock_do_ioctl+0x34f/0x5a0 net/socket.c:1154
sock_ioctl+0x47f/0x770 net/socket.c:1257
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Freed by task 4509:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x80 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xf1/0x270 mm/slub.c:4559
ax25_dev_put include/net/ax25.h:302 [inline]
ax25_dev_device_down+0x1bd/0x510 net/ax25/ax25_dev.c:119
ax25_device_event+0x4d1/0x500 net/ax25/af_ax25.c:144
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bpq_device_event+0x3c3/0x9d0 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bond_setup_by_slave+0x66/0x390 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x7b1/0x3c20 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x2a1/0xb40 drivers/net/bonding/bond_main.c:4238
dev_ifsioc+0xd7a/0x10c0 net/core/dev_ioctl.c:417
dev_ioctl+0x504/0xf60 net/core/dev_ioctl.c:587
sock_do_ioctl+0x34f/0x5a0 net/socket.c:1154
sock_ioctl+0x47f/0x770 net/socket.c:1257
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
The buggy address belongs to the object at ffff88805f64ee00
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 184 bytes inside of
192-byte region [ffff88805f64ee00, ffff88805f64eec0)
The buggy address belongs to the page:
page:ffffea00017d9380 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f64e
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea000085d100 0000000200000002 ffff888017441a00
raw: 0000000000000000 0000000000100010 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4166, ts 59523774743, free_ts 59523595570
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192
__alloc_pages+0x272/0x700 mm/page_alloc.c:5465
__alloc_pages_node include/linux/gfp.h:570 [inline]
alloc_slab_page mm/slub.c:1777 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xb1/0x4b0 mm/slub.c:1975
___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
__kmalloc_node+0x1fa/0x390 mm/slub.c:4451
kmalloc_array_node include/linux/slab.h:684 [inline]
kcalloc_node include/linux/slab.h:689 [inline]
memcg_alloc_page_obj_cgroups+0x7e/0x120 mm/memcontrol.c:2836
memcg_slab_post_alloc_hook mm/slab.h:313 [inline]
slab_post_alloc_hook+0xb6/0x380 mm/slab.h:526
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0xf3/0x280 mm/slub.c:3233
sock_alloc_inode+0x17/0xb0 net/socket.c:303
alloc_inode fs/inode.c:236 [inline]
new_inode_pseudo+0x60/0x210 fs/inode.c:976
sock_alloc net/socket.c:626 [inline]
__sock_create+0x11f/0x8f0 net/socket.c:1450
sock_create net/socket.c:1542 [inline]
__sys_socket+0x132/0x370 net/socket.c:1584
__do_sys_socket net/socket.c:1593 [inline]
__se_sys_socket net/socket.c:1591 [inline]
__x64_sys_socket+0x76/0x80 net/socket.c:1591
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
__vunmap+0x8b3/0xa50 mm/vmalloc.c:2621
copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline]
get_entries net/ipv4/netfilter/ip_tables.c:1023 [inline]
do_ipt_get_ctl+0x11d4/0x1880 net/ipv4/netfilter/ip_tables.c:1669
nf_getsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:116
ip_getsockopt+0x15be/0x2450 net/ipv4/ip_sockglue.c:1797
tcp_getsockopt+0x25a/0x6fe0 net/ipv4/tcp.c:4313
__sys_getsockopt+0x2a6/0x550 net/socket.c:2247
__do_sys_getsockopt net/socket.c:2262 [inline]
__se_sys_getsockopt net/socket.c:2259 [inline]
__x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2259
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Memory state around the buggy address:
ffff88805f64ed80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
ffff88805f64ee00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805f64ee80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff88805f64ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88805f64ef80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
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 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