Hello,
syzbot found the following issue on:
HEAD commit: 7e89efd3ae1c Linux 5.15.164
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=153b48d3980000
kernel config:
https://syzkaller.appspot.com/x/.config?x=8e7768447c833306
dashboard link:
https://syzkaller.appspot.com/bug?extid=aa9696808b5294ae3307
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/3d929e236949/disk-7e89efd3.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/8a76a46947c4/vmlinux-7e89efd3.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/12f4fa036ad7/Image-7e89efd3.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+aa9696...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in vlan_dev_get_iflink+0x78/0x7c net/8021q/vlan_dev.c:789
Read of size 4 at addr ffff0000cea1c0d0 by task kworker/1:11/4457
CPU: 1 PID: 4457 Comm: kworker/1:11 Not tainted 5.15.164-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: events linkwatch_event
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description+0x7c/0x3f0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x174/0x1e4 mm/kasan/report.c:451
__asan_report_load4_noabort+0x44/0x50 mm/kasan/report_generic.c:308
vlan_dev_get_iflink+0x78/0x7c net/8021q/vlan_dev.c:789
dev_get_iflink+0x70/0xc4 net/core/dev.c:704
default_operstate net/core/link_watch.c:41 [inline]
rfc2863_policy net/core/link_watch.c:53 [inline]
linkwatch_do_dev+0x100/0x3c8 net/core/link_watch.c:160
__linkwatch_run_queue+0x424/0x730 net/core/link_watch.c:213
linkwatch_event+0x58/0x68 net/core/link_watch.c:252
process_one_work+0x790/0x11b8 kernel/workqueue.c:2310
worker_thread+0x910/0x1034 kernel/workqueue.c:2457
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
Allocated by task 4036:
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+0xbc/0xfc mm/kasan/common.c:513
__kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522
kasan_kmalloc include/linux/kasan.h:264 [inline]
__kmalloc_node+0x2c0/0x5b8 mm/slub.c:4455
kmalloc_node include/linux/slab.h:614 [inline]
kvmalloc_node+0x88/0x204 mm/util.c:619
kvmalloc include/linux/mm.h:805 [inline]
kvzalloc include/linux/mm.h:813 [inline]
alloc_netdev_mqs+0x94/0x9d4 net/core/dev.c:10844
rtnl_create_link+0x2cc/0x8b4 net/core/rtnetlink.c:3206
__rtnl_newlink net/core/rtnetlink.c:3491 [inline]
rtnl_newlink+0xffc/0x1af4 net/core/rtnetlink.c:3549
rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5629
netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2504
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5647
netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline]
netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1352
netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1920
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
__sys_sendto+0x388/0x4d0 net/socket.c:2058
__do_sys_sendto net/socket.c:2070 [inline]
__se_sys_sendto net/socket.c:2066 [inline]
__arm64_sys_sendto+0xd8/0xf8 net/socket.c:2066
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Freed by task 148:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4c/0x84 mm/kasan/common.c:46
kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360
____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:374
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0x128/0x1ec mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0x178/0x410 mm/slub.c:4559
kvfree+0x40/0x50 mm/util.c:654
netdev_freemem+0x4c/0x64 net/core/dev.c:10798
netdev_release+0x88/0xb0 net/core/net-sysfs.c:1903
device_release+0x8c/0x1ac
kobject_cleanup lib/kobject.c:713 [inline]
kobject_release lib/kobject.c:744 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x2c4/0x438 lib/kobject.c:761
netdev_run_todo+0x968/0xae0 net/core/dev.c:10662
rtnl_unlock+0x14/0x20 net/core/rtnetlink.c:112
default_device_exit_batch+0x4c4/0x520 net/core/dev.c:11628
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x5e0/0x9bc net/core/net_namespace.c:599
process_one_work+0x790/0x11b8 kernel/workqueue.c:2310
worker_thread+0x910/0x1034 kernel/workqueue.c:2457
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
The buggy address belongs to the object at ffff0000cea1c000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 208 bytes inside of
4096-byte region [ffff0000cea1c000, ffff0000cea1d000)
The buggy address belongs to the page:
page:00000000c686fe5b refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000cea1a000 pfn:0x10ea18
head:00000000c686fe5b order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 fffffc00035bea08 fffffc0003650a08 ffff0000c0003500
raw: ffff0000cea1a000 0000000000040003 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000cea1bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000cea1c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000cea1c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000cea1c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000cea1c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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