syzbot


general protection fault in ethnl_parse_header

Status: fixed on 2020/05/10 10:42
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+258a9089477493cea67b@syzkaller.appspotmail.com
Fix commit: 55b474c41e58 netlink: check for null extack in cookie helpers
First crash: 1557d, last: 1552d
Cause bisection: introduced by (bisect log) :
commit 2363d73a2f3e92787f336721c40918ba2eb0c74c
Author: Michal Kubecek <mkubecek@suse.cz>
Date: Sun Mar 15 17:17:53 2020 +0000

  ethtool: reject unrecognized request flags

Crash: general protection fault in ethnl_parse_header (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH net v2] netlink: check for null extack in cookie helpers 2 (2) 2020/03/24 04:20
[PATCH net] netlink: check for null extack in cookie helpers 3 (3) 2020/03/20 22:27
general protection fault in ethnl_parse_header 0 (1) 2020/03/19 13:37

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 1 PID: 9618 Comm: syz-executor260 Not tainted 5.6.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ethnl_parse_header+0x522/0x840 include/linux/string.h:381
Code: ea 03 80 3c 02 00 0f 85 1d 03 00 00 4d 89 7d 08 e8 d3 70 2d fb 49 8d 7d 10 48 ba 00 00 00 00 00 fc ff df 48 89 f8 48 c1 e8 03 <0f> b6 0c 10 49 8d 45 13 48 89 c6 48 c1 ee 03 0f b6 14 16 48 89 fe
RSP: 0018:ffffc90001f774d8 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff88809f326414 RCX: ffffffff8644a170
RDX: dffffc0000000000 RSI: ffffffff8644a4ed RDI: 0000000000000010
RBP: ffff8880a1c909c0 R08: ffff888093c784c0 R09: ffffc90001f77510
R10: fffff520003eeea5 R11: ffffc90001f7752f R12: 1ffff920003eee9e
R13: 0000000000000000 R14: ffffffff8a343080 R15: ffff88809f326418
FS:  0000000000db9880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043e930 CR3: 00000000a8560000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ethnl_default_parse+0x1c1/0x300 net/ethtool/netlink.c:264
 ethnl_default_start+0x1ed/0x4d0 net/ethtool/netlink.c:492
 __netlink_dump_start+0x58a/0x910 net/netlink/af_netlink.c:2343
 genl_family_rcv_msg_dumpit net/netlink/genetlink.c:630 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:715 [inline]
 genl_rcv_msg+0xa32/0xdf0 net/netlink/genetlink.c:735
 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:746
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6b9/0x7d0 net/socket.c:2343
 ___sys_sendmsg+0x100/0x170 net/socket.c:2397
 __sys_sendmsg+0xec/0x1b0 net/socket.c:2430
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x444159
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 1b d8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffce793ec8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000444159
RDX: 0000000000000000 RSI: 0000000020000780 RDI: 0000000000000003
RBP: 00000000006ce018 R08: 0000000000000000 R09: 00000000004002e0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401e00
R13: 0000000000401e90 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 4a1c933806fc4423 ]---
RIP: 0010:ethnl_parse_header+0x522/0x840 include/linux/string.h:381
Code: ea 03 80 3c 02 00 0f 85 1d 03 00 00 4d 89 7d 08 e8 d3 70 2d fb 49 8d 7d 10 48 ba 00 00 00 00 00 fc ff df 48 89 f8 48 c1 e8 03 <0f> b6 0c 10 49 8d 45 13 48 89 c6 48 c1 ee 03 0f b6 14 16 48 89 fe
RSP: 0018:ffffc90001f774d8 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff88809f326414 RCX: ffffffff8644a170
RDX: dffffc0000000000 RSI: ffffffff8644a4ed RDI: 0000000000000010
RBP: ffff8880a1c909c0 R08: ffff888093c784c0 R09: ffffc90001f77510
R10: fffff520003eeea5 R11: ffffc90001f7752f R12: 1ffff920003eee9e
R13: 0000000000000000 R14: ffffffff8a343080 R15: ffff88809f326418
FS:  0000000000db9880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043e930 CR3: 00000000a8560000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/20 17:13 net-old 6002059d7882 2c31c529 .config console log report syz C ci-upstream-net-this-kasan-gce
2020/03/19 07:20 net-old 2de9780f7507 0a96a13c .config console log report syz C ci-upstream-net-this-kasan-gce
2020/03/24 10:31 net-old 684ac83e3699 33e14df3 .config console log report ci-upstream-net-this-kasan-gce
2020/03/22 22:35 net-old 749f6f684311 78267cec .config console log report ci-upstream-net-this-kasan-gce
2020/03/22 14:36 net-old 9de9aa487daf 78267cec .config console log report ci-upstream-net-this-kasan-gce
2020/03/21 15:33 net-old 07f8e4d0fddb 4288d95e .config console log report ci-upstream-net-this-kasan-gce
2020/03/21 13:36 net-old 07f8e4d0fddb 4288d95e .config console log report ci-upstream-net-this-kasan-gce
2020/03/19 12:20 net-old 3c025b631727 2c31c529 .config console log report ci-upstream-net-this-kasan-gce
2020/03/19 06:50 net-old 2de9780f7507 0a96a13c .config console log report ci-upstream-net-this-kasan-gce
* Struck through repros no longer work on HEAD.