syzbot


KASAN: slab-out-of-bounds Read in skb_gso_transport_seglen

Status: auto-closed as invalid on 2020/09/04 10:34
Reported-by: syzbot+e0b5cfed4ac23a208501@syzkaller.appspotmail.com
First crash: 1661d, last: 1661d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in skb_gso_transport_seglen net C done 4 1659d 1679d 15/28 fixed on 2020/07/17 17:58

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in __tcp_hdrlen include/linux/tcp.h:35 [inline]
BUG: KASAN: slab-out-of-bounds in tcp_hdrlen include/linux/tcp.h:40 [inline]
BUG: KASAN: slab-out-of-bounds in skb_gso_transport_seglen+0x2df/0x300 net/core/skbuff.c:4944
Read of size 2 at addr ffff888066eb8a8c by task syz-executor.5/29803

CPU: 1 PID: 29803 Comm: syz-executor.5 Not tainted 4.14.179-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x13e/0x194 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393
 __tcp_hdrlen include/linux/tcp.h:35 [inline]
 tcp_hdrlen include/linux/tcp.h:40 [inline]
 skb_gso_transport_seglen+0x2df/0x300 net/core/skbuff.c:4944
 skb_gso_mac_seglen include/linux/skbuff.h:4124 [inline]
 tbf_enqueue+0x248/0x930 net/sched/sch_tbf.c:191
 __dev_xmit_skb net/core/dev.c:3229 [inline]
 __dev_queue_xmit+0x12dc/0x25c0 net/core/dev.c:3493
 packet_snd net/packet/af_packet.c:3012 [inline]
 packet_sendmsg+0x1bf7/0x54b0 net/packet/af_packet.c:3037
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xc5/0x100 net/socket.c:656
 SYSC_sendto+0x1c4/0x2b0 net/socket.c:1763
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c829
RSP: 002b:00007f8044138c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000500fa0 RCX: 000000000045c829
RDX: 0000000000004e60 RSI: 0000000020000180 RDI: 0000000000000003
RBP: 000000000078bf00 R08: 0000000000000000 R09: fffffffffffffe5d
R10: 0000000000000810 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000a0f R14: 00000000004ccc62 R15: 00007f80441396d4

Allocated by task 29803:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc mm/kasan/kasan.c:551 [inline]
 kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529
 __do_kmalloc_node mm/slab.c:3682 [inline]
 __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3696
 __kmalloc_reserve.isra.0+0x35/0xd0 net/core/skbuff.c:137
 __alloc_skb+0xca/0x4c0 net/core/skbuff.c:205
 alloc_skb include/linux/skbuff.h:980 [inline]
 alloc_skb_with_frags+0x85/0x4f0 net/core/skbuff.c:5228
 sock_alloc_send_pskb+0x586/0x6d0 net/core/sock.c:2081
 packet_alloc_skb net/packet/af_packet.c:2862 [inline]
 packet_snd net/packet/af_packet.c:2957 [inline]
 packet_sendmsg+0x1529/0x54b0 net/packet/af_packet.c:3037
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xc5/0x100 net/socket.c:656
 SYSC_sendto+0x1c4/0x2b0 net/socket.c:1763
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 1:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xcb/0x260 mm/slab.c:3815
 kernfs_fop_release+0x10d/0x180 fs/kernfs/file.c:783
 __fput+0x25f/0x790 fs/file_table.c:210
 task_work_run+0x113/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1d6/0x220 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

The buggy address belongs to the object at ffff888066eb8840
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 76 bytes to the right of
 512-byte region [ffff888066eb8840, ffff888066eb8a40)
The buggy address belongs to the page:
page:ffffea00019bae00 count:1 mapcount:0 mapping:ffff888066eb80c0 index:0xffff888066eb8d40
flags: 0xfffe0000000100(slab)
raw: 00fffe0000000100 ffff888066eb80c0 ffff888066eb8d40 0000000100000003
raw: ffffea00021da660 ffffea0001690160 ffff88812fe54940 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888066eb8980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888066eb8a00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff888066eb8a80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
                      ^
 ffff888066eb8b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888066eb8b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/07 10:33 linux-4.14.y d71f695ce745 98cbd87b .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.