syzbot


KASAN: use-after-free Read in dev_queue_xmit_nit (2)

Status: closed as invalid on 2018/01/22 17:57
Subsystems: net
[Documentation on labels]
First crash: 2344d, last: 2342d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-414 KASAN: use-after-free Read in dev_queue_xmit_nit 1 1623d 1623d 0/1 auto-closed as invalid on 2020/03/12 11:34
upstream KASAN: use-after-free Read in dev_queue_xmit_nit (3) net 3 2041d 2051d 0/26 closed as invalid on 2018/12/05 17:50
linux-4.19 KASAN: use-after-free Read in dev_queue_xmit_nit C error 90 443d 1645d 0/1 upstream: reported C repro on 2019/10/22 19:23
upstream KASAN: use-after-free Read in dev_queue_xmit_nit C 13 2402d 2414d 3/26 fixed on 2017/11/06 08:47
linux-4.14 KASAN: use-after-free Read in dev_queue_xmit_nit (2) syz error 18 630d 1421d 0/1 upstream: reported syz repro on 2020/06/02 08:57
linux-4.14 KASAN: use-after-free Read in dev_queue_xmit_nit 5 1656d 1766d 0/1 auto-closed as invalid on 2020/02/08 07:01

Sample crash report:
device syz6 entered promiscuous mode
dev_remove_pack: ffff8801cc297e40 not found
==================================================================
BUG: KASAN: use-after-free in skb_loop_sk net/core/dev.c:1892 [inline]
BUG: KASAN: use-after-free in dev_queue_xmit_nit+0xb6d/0xc40 net/core/dev.c:1921
Read of size 8 at addr ffff8801cc297e60 by task kworker/0:3/1368

CPU: 0 PID: 1368 Comm: kworker/0:3 Not tainted 4.14.0+ #100
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: ipv6_addrconf addrconf_dad_work
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:53
 print_address_description+0x73/0x250 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report+0x25b/0x340 mm/kasan/report.c:409
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430
 skb_loop_sk net/core/dev.c:1892 [inline]
 dev_queue_xmit_nit+0xb6d/0xc40 net/core/dev.c:1921
 xmit_one net/core/dev.c:2986 [inline]
 dev_hard_start_xmit+0x16b/0xac0 net/core/dev.c:3006
 sch_direct_xmit+0x31d/0x6d0 net/sched/sch_generic.c:186
 __dev_xmit_skb net/core/dev.c:3188 [inline]
 __dev_queue_xmit+0x16f4/0x2070 net/core/dev.c:3455
 dev_queue_xmit+0x17/0x20 net/core/dev.c:3520
 neigh_direct_output+0x15/0x20 net/core/neighbour.c:1390
 neigh_output include/net/neighbour.h:482 [inline]
 ip6_finish_output2+0xad1/0x2310 net/ipv6/ip6_output.c:120
 ip6_finish_output+0x2f9/0x920 net/ipv6/ip6_output.c:146
 NF_HOOK_COND include/linux/netfilter.h:239 [inline]
 ip6_output+0x1eb/0x840 net/ipv6/ip6_output.c:163
 dst_output include/net/dst.h:460 [inline]
 NF_HOOK.constprop.36+0xff/0x630 include/linux/netfilter.h:250
 mld_sendpack+0x6a8/0xcc0 net/ipv6/mcast.c:1660
 mld_send_initial_cr.part.25+0x103/0x150 net/ipv6/mcast.c:2072
 mld_send_initial_cr net/ipv6/mcast.c:2056 [inline]
 ipv6_mc_dad_complete+0x99/0x130 net/ipv6/mcast.c:2079
 addrconf_dad_completed+0x595/0x970 net/ipv6/addrconf.c:4048
 addrconf_dad_begin net/ipv6/addrconf.c:3842 [inline]
 addrconf_dad_work+0x3ae/0x10b0 net/ipv6/addrconf.c:3944
 process_one_work+0xbfd/0x1be0 kernel/workqueue.c:2112
 worker_thread+0x223/0x1990 kernel/workqueue.c:2246
 kthread+0x37a/0x440 kernel/kthread.c:238
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:437

Allocated by task 3081:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551
 __do_kmalloc mm/slab.c:3711 [inline]
 __kmalloc+0x162/0x760 mm/slab.c:3720
 kmalloc include/linux/slab.h:504 [inline]
 sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1469
 sk_alloc+0x89/0x700 net/core/sock.c:1523
 packet_create+0x169/0xb00 net/packet/af_packet.c:3213
 __sock_create+0x4d4/0x850 net/socket.c:1261
 sock_create net/socket.c:1301 [inline]
 SYSC_socket net/socket.c:1331 [inline]
 SyS_socket+0xeb/0x200 net/socket.c:1311
 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline]
 do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389
 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:125

Freed by task 3102:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3491 [inline]
 kfree+0xca/0x250 mm/slab.c:3806
 sk_prot_free net/core/sock.c:1506 [inline]
 __sk_destruct+0x74a/0x910 net/core/sock.c:1585
 sk_destruct+0x47/0x80 net/core/sock.c:1593
 __sk_free+0x57/0x230 net/core/sock.c:1601
 sk_free+0x2a/0x40 net/core/sock.c:1612
 sock_put include/net/sock.h:1655 [inline]
 packet_release+0x883/0xde0 net/packet/af_packet.c:3047
 sock_release+0x8d/0x1e0 net/socket.c:596
 sock_close+0x16/0x20 net/socket.c:1125
 __fput+0x333/0x7f0 fs/file_table.c:210
 ____fput+0x15/0x20 fs/file_table.c:244
 task_work_run+0x199/0x270 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x9bb/0x1ae0 kernel/exit.c:865
 do_group_exit+0x149/0x400 kernel/exit.c:968
 get_signal+0x73f/0x16c0 kernel/signal.c:2335
 do_signal+0x94/0x1ee0 arch/x86/kernel/signal.c:809
 exit_to_usermode_loop+0x214/0x310 arch/x86/entry/common.c:158
 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:264 [inline]
 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline]
 do_fast_syscall_32+0xbfd/0xf9d arch/x86/entry/common.c:389
 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:125

The buggy address belongs to the object at ffff8801cc297680
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 2016 bytes inside of
 2048-byte region [ffff8801cc297680, ffff8801cc297e80)
The buggy address belongs to the page:
page:ffffea000730a580 count:1 mapcount:0 mapping:ffff8801cc296580 index:0x0 compound_mapcount: 0
flags: 0x2fffc0000008100(slab|head)
raw: 02fffc0000008100 ffff8801cc296580 0000000000000000 0000000100000003
raw: ffffea0006fe6620 ffffea0007309620 ffff8801db000c40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801cc297d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801cc297d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8801cc297e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff8801cc297e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801cc297f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/11/22 09:29 net-next-old 0c86a6bd85ff ddf7b3e0 .config console log report syz ci-upstream-kasan-gce-386
2017/11/24 07:39 mmots 1ea8d039f9ed deb5f6ae .config console log report ci-upstream-mmots-kasan-gce
* Struck through repros no longer work on HEAD.