syzbot


KASAN: use-after-free Read in skb_release_data

Status: auto-closed as invalid on 2019/02/22 12:31
First crash: 2177d, last: 2177d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in skb_release_data 2 1d00h 7d18h 0/3 upstream: reported on 2024/04/17 18:13
linux-4.14 KASAN: use-after-free Read in skb_release_data 1 1725d 1725d 0/1 auto-closed as invalid on 2019/12/02 22:53
upstream KASAN: use-after-free Read in skb_release_data syz 7 2444d 2444d 3/26 fixed on 2017/10/24 06:54
linux-5.15 KASAN: use-after-free Read in skb_release_data 1 382d 382d 0/3 auto-obsoleted due to no activity on 2023/08/06 13:46
linux-4.14 KASAN: use-after-free Read in skb_release_data (2) syz inconclusive 1 1513d 1513d 0/1 upstream: reported syz repro on 2020/03/03 17:50
upstream general protection fault in skb_release_data (2) net C done error 529 3h58m 1324d 0/26 upstream: reported C repro on 2020/09/09 09:58
upstream KASAN: use-after-free Read in skb_release_data (2) bluetooth syz done done 1 1515d 1515d 0/26 auto-obsoleted due to no activity on 2022/09/13 15:46

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
protocol 0000 is buggy, dev sit0
==================================================================
BUG: KASAN: use-after-free in skb_release_data+0x36c/0x400 net/core/skbuff.c:593
Read of size 1 at addr ffff8801da343240 by task syz-executor4/10140

CPU: 1 PID: 10140 Comm: syz-executor4 Not tainted 4.9.99-gc462abb #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff88018f18f480 ffffffff81eb0f09 ffffea000768d080 ffff8801da343240
 0000000000000000 ffff8801da343240 1ffff10031e31ecb ffff88018f18f4b8
 ffffffff815652eb ffff8801da343240 0000000000000001 0000000000000000
Call Trace:
 [<ffffffff81eb0f09>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81eb0f09>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff815652eb>] print_address_description+0x6c/0x234 mm/kasan/report.c:256
 [<ffffffff815656f5>] kasan_report_error mm/kasan/report.c:355 [inline]
 [<ffffffff815656f5>] kasan_report.cold.6+0x242/0x2fe mm/kasan/report.c:412
 [<ffffffff81539314>] __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430
 [<ffffffff8303020c>] skb_release_data+0x36c/0x400 net/core/skbuff.c:593
 [<ffffffff830302ea>] skb_release_all+0x4a/0x60 net/core/skbuff.c:670
 [<ffffffff83030315>] __kfree_skb+0x15/0x20 net/core/skbuff.c:684
 [<ffffffff830303ec>] kfree_skb+0xcc/0x340 net/core/skbuff.c:705
 [<ffffffff8366e96b>] sit_tunnel_xmit+0xfb/0x2590 net/ipv6/sit.c:1033
 [<ffffffff830858b7>] __netdev_start_xmit include/linux/netdevice.h:4062 [inline]
 [<ffffffff830858b7>] netdev_start_xmit include/linux/netdevice.h:4071 [inline]
 [<ffffffff830858b7>] xmit_one net/core/dev.c:2955 [inline]
 [<ffffffff830858b7>] dev_hard_start_xmit+0x197/0x8b0 net/core/dev.c:2971
 [<ffffffff83087c35>] __dev_queue_xmit+0x19a5/0x2080 net/core/dev.c:3451
 [<ffffffff83088327>] dev_queue_xmit+0x17/0x20 net/core/dev.c:3484
 [<ffffffff8368d88f>] packet_snd net/packet/af_packet.c:2960 [inline]
 [<ffffffff8368d88f>] packet_sendmsg+0x1eff/0x4470 net/packet/af_packet.c:2985
 [<ffffffff83012fcc>] sock_sendmsg_nosec net/socket.c:635 [inline]
 [<ffffffff83012fcc>] sock_sendmsg+0xcc/0x110 net/socket.c:645
 [<ffffffff83013cbc>] SYSC_sendto+0x21c/0x370 net/socket.c:1670
 [<ffffffff830162d0>] SyS_sendto+0x40/0x50 net/socket.c:1638
 [<ffffffff81006316>] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 [<ffffffff839f4653>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb

Allocated by task 10140:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack+0x43/0xd0 mm/kasan/kasan.c:505
 set_track mm/kasan/kasan.c:517 [inline]
 kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:609
 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:547
 slab_post_alloc_hook mm/slab.h:417 [inline]
 slab_alloc_node mm/slub.c:2715 [inline]
 slab_alloc mm/slub.c:2723 [inline]
 __kmalloc_track_caller+0xdc/0x2b0 mm/slub.c:4232
 __kmalloc_reserve.isra.37+0x33/0xc0 net/core/skbuff.c:138
 __alloc_skb+0x11a/0x600 net/core/skbuff.c:231
 alloc_skb include/linux/skbuff.h:919 [inline]
 alloc_skb_with_frags+0xaf/0x520 net/core/skbuff.c:4678
 sock_alloc_send_pskb+0x5a9/0x750 net/core/sock.c:1893
 packet_alloc_skb net/packet/af_packet.c:2817 [inline]
 packet_snd net/packet/af_packet.c:2908 [inline]
 packet_sendmsg+0x1581/0x4470 net/packet/af_packet.c:2985
 sock_sendmsg_nosec net/socket.c:635 [inline]
 sock_sendmsg+0xcc/0x110 net/socket.c:645
 SYSC_sendto+0x21c/0x370 net/socket.c:1670
 SyS_sendto+0x40/0x50 net/socket.c:1638
 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 entry_SYSCALL_64_after_swapgs+0x5d/0xdb

Freed by task 10141:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack+0x43/0xd0 mm/kasan/kasan.c:505
 set_track mm/kasan/kasan.c:517 [inline]
 kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:582
 slab_free_hook mm/slub.c:1355 [inline]
 slab_free_freelist_hook mm/slub.c:1377 [inline]
 slab_free mm/slub.c:2958 [inline]
 kfree+0xfb/0x310 mm/slub.c:3878
 skb_free_head+0x8b/0xb0 net/core/skbuff.c:580
 skb_release_data+0x329/0x400 net/core/skbuff.c:611
 skb_release_all+0x4a/0x60 net/core/skbuff.c:670
 __kfree_skb+0x15/0x20 net/core/skbuff.c:684
 kfree_skb+0xcc/0x340 net/core/skbuff.c:705
 sock_recv_errqueue+0xcc/0x3f0 net/core/sock.c:2647
 packet_recvmsg+0x88f/0xf40 net/packet/af_packet.c:3314
 sock_recvmsg_nosec net/socket.c:737 [inline]
 sock_recvmsg+0xc6/0x110 net/socket.c:744
 ___sys_recvmsg+0x242/0x550 net/socket.c:2128
 __sys_recvmmsg+0x25d/0x700 net/socket.c:2236
 SYSC_recvmmsg net/socket.c:2317 [inline]
 SyS_recvmmsg+0xeb/0x1c0 net/socket.c:2301
 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 entry_SYSCALL_64_after_swapgs+0x5d/0xdb

The buggy address belongs to the object at ffff8801da343180
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 192 bytes inside of
 512-byte region [ffff8801da343180, ffff8801da343380)
The buggy address belongs to the page:
page:ffffea000768d080 count:1 mapcount:0 mapping:          (null) index:0x0 compound_mapcount: 0
flags: 0x8000000000004080(slab|head)
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801da343100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801da343180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8801da343200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff8801da343280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801da343300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/05/10 01:26 https://android.googlesource.com/kernel/common android-4.9 c462abbf779b 12c7428a .config console log report ci-android-49-kasan-gce-root
* Struck through repros no longer work on HEAD.