syzbot


KASAN: use-after-free Read in bpf_skb_vlan_push

Status: auto-closed as invalid on 2019/05/03 14:24
Reported-by: syzbot+001ca2ee477f86cc2552@syzkaller.appspotmail.com
First crash: 1998d, last: 1998d

Sample crash report:
netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'.
==================================================================
BUG: KASAN: use-after-free in skb_at_tc_ingress include/net/sch_generic.h:452 [inline]
BUG: KASAN: use-after-free in bpf_push_mac_rcsum net/core/filter.c:1422 [inline]
BUG: KASAN: use-after-free in ____bpf_skb_vlan_push net/core/filter.c:1969 [inline]
BUG: KASAN: use-after-free in bpf_skb_vlan_push+0x45e/0x540 net/core/filter.c:1960
Read of size 4 at addr ffff88019c844e88 by task syz-executor5/23424

CPU: 1 PID: 23424 Comm: syz-executor5 Not tainted 4.14.78+ #27
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0xb9/0x11b lib/dump_stack.c:53
 print_address_description+0x60/0x22b mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409
 skb_at_tc_ingress include/net/sch_generic.h:452 [inline]
 bpf_push_mac_rcsum net/core/filter.c:1422 [inline]
 ____bpf_skb_vlan_push net/core/filter.c:1969 [inline]
 bpf_skb_vlan_push+0x45e/0x540 net/core/filter.c:1960
 ___bpf_prog_run+0x248e/0x5c70 kernel/bpf/core.c:1012

Allocated by task 22648:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551
 __kmalloc+0x153/0x340 mm/slub.c:3760
 kmalloc_array include/linux/slab.h:607 [inline]
 kcalloc include/linux/slab.h:618 [inline]
 iter_file_splice_write+0x142/0xab0 fs/splice.c:692
 do_splice_from fs/splice.c:851 [inline]
 direct_splice_actor+0x116/0x160 fs/splice.c:1018
 splice_direct_to_actor+0x28c/0x750 fs/splice.c:973
 do_splice_direct+0x17b/0x220 fs/splice.c:1061
 do_sendfile+0x4a1/0xb50 fs/read_write.c:1438
 SYSC_sendfile64 fs/read_write.c:1493 [inline]
 SyS_sendfile64+0xab/0x140 fs/read_write.c:1485
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 22648:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:524
 slab_free_hook mm/slub.c:1389 [inline]
 slab_free_freelist_hook mm/slub.c:1410 [inline]
 slab_free mm/slub.c:2966 [inline]
 kfree+0xf5/0x310 mm/slub.c:3897
 iter_file_splice_write+0x4cb/0xab0 fs/splice.c:776
 do_splice_from fs/splice.c:851 [inline]
 direct_splice_actor+0x116/0x160 fs/splice.c:1018
 splice_direct_to_actor+0x28c/0x750 fs/splice.c:973
 do_splice_direct+0x17b/0x220 fs/splice.c:1061
 do_sendfile+0x4a1/0xb50 fs/read_write.c:1438
 SYSC_sendfile64 fs/read_write.c:1493 [inline]
 SyS_sendfile64+0xab/0x140 fs/read_write.c:1485
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

The buggy address belongs to the object at ffff88019c844dc0
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 200 bytes inside of
 256-byte region [ffff88019c844dc0, ffff88019c844ec0)
The buggy address belongs to the page:
page:ffffea0006721100 count:1 mapcount:0 mapping:          (null) index:0x0
flags: 0x4000000000000100(slab)
raw: 4000000000000100 0000000000000000 0000000000000000 00000001000c000c
raw: dead000000000100 dead000000000200 ffff8801da802e00 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88019c844d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
 ffff88019c844e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88019c844e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                      ^
 ffff88019c844f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88019c844f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/04 14:23 android-4.14 12064f3a794e 8bd6bd63 .config console log report ci-android-414-kasan-gce-root
* Struck through repros no longer work on HEAD.