syzbot


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

Status: fixed on 2018/07/09 18:05
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+efae31b384d5badbd620@syzkaller.appspotmail.com
Fix commit: 58990d1ff3f7 bpf: reject passing modified ctx to helper functions
First crash: 2147d, last: 2147d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 4.14 00/62] 4.14.164-stable review 66 (66) 2020/01/13 15:47
[PATCH 4.17 00/67] 4.17.7-stable review 74 (74) 2018/07/17 09:41
KASAN: slab-out-of-bounds Read in bpf_csum_update 3 (4) 2018/06/08 09:53
[PATCH bpf] bpf: reject passing modified ctx to helper functions 4 (4) 2018/06/07 19:43

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
==================================================================
BUG: KASAN: slab-out-of-bounds in ____bpf_csum_update net/core/filter.c:1679 [inline]
BUG: KASAN: slab-out-of-bounds in bpf_csum_update+0xb4/0xc0 net/core/filter.c:1673
Read of size 1 at addr ffff8801d9235b50 by task syz-executor507/4513

CPU: 0 PID: 4513 Comm: syz-executor507 Not tainted 4.17.0-rc7+ #78
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1b9/0x294 lib/dump_stack.c:113
 print_address_description+0x6c/0x20b mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430
 ____bpf_csum_update net/core/filter.c:1679 [inline]
 bpf_csum_update+0xb4/0xc0 net/core/filter.c:1673

Allocated by task 0:
(stack is not available)

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8801d9235a40
 which belongs to the cache skbuff_head_cache of size 232
The buggy address is located 40 bytes to the right of
 232-byte region [ffff8801d9235a40, ffff8801d9235b28)
The buggy address belongs to the page:
page:ffffea0007648d40 count:1 mapcount:0 mapping:ffff8801d9235040 index:0x0
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801d9235040 0000000000000000 000000010000000c
raw: ffffea00074360a0 ffff8801d944d848 ffff8801d9bdd6c0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801d9235a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801d9235a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8801d9235b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                 ^
 ffff8801d9235b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801d9235c00: 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
2018/06/01 19:43 upstream 0512e0134582 2f93b54f .config console log report syz C ci-upstream-kasan-gce-root
2018/06/01 19:06 bpf-next bcece5dc40b9 2f93b54f .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.