2018-01-10 17:31:39

by syzbot

[permalink] [raw]
Subject: WARNING in ___bpf_prog_run

Hello,

syzkaller hit the following crash on
b4464bcab38d3f7fe995a7cb960eeac6889bec08
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.
C reproducer is attached
syzkaller reproducer is attached. See https://goo.gl/kgGztJ
for information about syzkaller reproducers


IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: [email protected]
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

------------[ cut here ]------------
unknown opcode cc
WARNING: CPU: 0 PID: 3509 at kernel/bpf/core.c:1304
___bpf_prog_run+0x4a49/0x6100 kernel/bpf/core.c:1304
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 3509 Comm: syzkaller223127 Not tainted
4.15.0-rc7-next-20180110+ #93
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+0x194/0x257 lib/dump_stack.c:53
panic+0x1e4/0x41c kernel/panic.c:183
__warn+0x1dc/0x200 kernel/panic.c:547
report_bug+0x211/0x2d0 lib/bug.c:184
fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
fixup_bug arch/x86/kernel/traps.c:247 [inline]
do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
invalid_op+0x22/0x40 arch/x86/entry/entry_64.S:1102
RIP: 0010:___bpf_prog_run+0x4a49/0x6100 kernel/bpf/core.c:1304
RSP: 0018:ffff8801bf3ff280 EFLAGS: 00010286
RAX: dffffc0000000008 RBX: 1ffff10037e7fe5c RCX: ffffffff815a24ae
RDX: 0000000000000000 RSI: ffff8801bf710de0 RDI: 0000000000000293
RBP: ffff8801bf3ff388 R08: 1ffff10037e7fde3 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000
R13: ffffc90000002048 R14: 00000000000000cc R15: 0000000000000000
__bpf_prog_run32+0xce/0x130 kernel/bpf/core.c:1345
bpf_prog_run_save_cb include/linux/filter.h:556 [inline]
sk_filter_trim_cap+0x33c/0x9c0 net/core/filter.c:103
sk_filter include/linux/filter.h:685 [inline]
netlink_unicast+0x1b8/0x6b0 net/netlink/af_netlink.c:1336
nlmsg_unicast include/net/netlink.h:608 [inline]
rtnl_unicast net/core/rtnetlink.c:700 [inline]
rtnl_stats_get+0x7bb/0xa10 net/core/rtnetlink.c:4355
rtnetlink_rcv_msg+0x57f/0xb10 net/core/rtnetlink.c:4522
netlink_rcv_skb+0x224/0x470 net/netlink/af_netlink.c:2441
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4540
netlink_unicast_kernel net/netlink/af_netlink.c:1308 [inline]
netlink_unicast+0x4c4/0x6b0 net/netlink/af_netlink.c:1334
netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1897
sock_sendmsg_nosec net/socket.c:628 [inline]
sock_sendmsg+0xca/0x110 net/socket.c:638
sock_write_iter+0x31a/0x5d0 net/socket.c:907
call_write_iter include/linux/fs.h:1775 [inline]
new_sync_write fs/read_write.c:469 [inline]
__vfs_write+0x684/0x970 fs/read_write.c:482
vfs_write+0x189/0x510 fs/read_write.c:544
SYSC_write fs/read_write.c:589 [inline]
SyS_write+0xef/0x220 fs/read_write.c:581
entry_SYSCALL_64_fastpath+0x29/0xa0
RIP: 0033:0x43ffc9
RSP: 002b:00007ffeda9c4c88 EFLAGS: 00000217 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 000000000043ffc9
RDX: 0000000000000026 RSI: 0000000020fd3000 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000217 R12: 0000000000401930
R13: 00000000004019c0 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to [email protected].

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.


Attachments:
config.txt (131.01 kB)
raw.log (6.63 kB)
repro.txt (1.14 kB)
repro.c (4.06 kB)
Download all attachments

2018-01-10 18:50:28

by Daniel Borkmann

[permalink] [raw]
Subject: Re: WARNING in ___bpf_prog_run

On 01/10/2018 06:31 PM, syzbot wrote:
> Hello,
>
> syzkaller hit the following crash on b4464bcab38d3f7fe995a7cb960eeac6889bec08
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
> C reproducer is attached
> syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> for information about syzkaller reproducers

Fix coming in a bit, thanks.