syzbot


general protection fault in inet6_set_link_af

Status: fixed on 2020/02/18 14:31
Subsystems: net
[Documentation on labels]
Fix commit: db3fa271022d ipv6/addrconf: fix potential NULL deref in inet6_set_link_af()
First crash: 1572d, last: 1568d
Cause bisection: introduced by (bisect log) :
commit 7dc2bccab0ee37ac28096b8fcdc390a679a15841
Author: Maxim Mikityanskiy <maximmi@mellanox.com>
Date: Tue May 21 06:40:04 2019 +0000

  Validate required parameters in inet6_validate_link_af

Crash: general protection fault in inet6_set_link_af (log)
Repro: C syz .config
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 general protection fault in inet6_set_link_af C 1 1572d 1572d 1/2 fixed on 2021/10/12 13:38

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready
general protection fault, probably for non-canonical address 0xdffffc0000000056: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000002b0-0x00000000000002b7]
CPU: 0 PID: 10982 Comm: syz-executor436 Not tainted 5.5.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:inet6_set_link_af+0x66e/0xae0 net/ipv6/addrconf.c:5733
Code: 38 d0 7f 08 84 c0 0f 85 20 03 00 00 48 8d bb b0 02 00 00 45 0f b6 64 24 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 44 89 a3 b0 02 00
RSP: 0018:ffffc900058d6d40 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86e119a6
RDX: 0000000000000056 RSI: ffffffff86e11e74 RDI: 00000000000002b0
RBP: ffffc900058d6e70 R08: ffff888097f3c480 R09: ffffc900058d6db0
R10: fffff52000b1adbe R11: ffffc900058d6df7 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880a7d71c24 R15: dffffc0000000000
FS:  000000000075a880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055666ccba008 CR3: 00000000a6f57000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do_setlink+0x2a9f/0x3720 net/core/rtnetlink.c:2754
 rtnl_group_changelink net/core/rtnetlink.c:3103 [inline]
 __rtnl_newlink+0xdd1/0x1790 net/core/rtnetlink.c:3257
 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3377
 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5438
 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5456
 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
 netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328
 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:672
 ____sys_sendmsg+0x753/0x880 net/socket.c:2343
 ___sys_sendmsg+0x100/0x170 net/socket.c:2397
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430
 __do_sys_sendmsg net/socket.c:2439 [inline]
 __se_sys_sendmsg net/socket.c:2437 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4402e9
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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffde8aed008 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004402e9
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000008 R09: 00000000004002c8
R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000401b70
R13: 0000000000401c00 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace b553d38f3952cf88 ]---
RIP: 0010:inet6_set_link_af+0x66e/0xae0 net/ipv6/addrconf.c:5733
Code: 38 d0 7f 08 84 c0 0f 85 20 03 00 00 48 8d bb b0 02 00 00 45 0f b6 64 24 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 44 89 a3 b0 02 00
RSP: 0018:ffffc900058d6d40 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86e119a6
RDX: 0000000000000056 RSI: ffffffff86e11e74 RDI: 00000000000002b0
RBP: ffffc900058d6e70 R08: ffff888097f3c480 R09: ffffc900058d6db0
R10: fffff52000b1adbe R11: ffffc900058d6df7 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880a7d71c24 R15: dffffc0000000000
FS:  000000000075a880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055666ccba008 CR3: 00000000a6f57000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/09 06:18 upstream d4f309ca4118 06150bf1 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/02/07 16:22 upstream 90568ecf5615 06150bf1 .config console log report syz C ci-upstream-kasan-gce-root
2020/02/06 19:56 upstream 4c46bef2e96a c91cbc9d .config console log report syz C ci-upstream-kasan-gce
2020/02/06 07:35 upstream 4c7d00ccf40d 662cf49a .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/06 00:27 upstream 6992ca0dd017 662cf49a .config console log report syz C ci-upstream-kasan-gce-386
2020/02/05 09:09 net-old 33b40134e5cf 93e5e335 .config console log report syz C ci-upstream-net-this-kasan-gce
2020/02/06 00:42 net-next-old 33b40134e5cf 662cf49a .config console log report syz C ci-upstream-net-kasan-gce
2020/02/07 01:06 upstream 4c46bef2e96a c91cbc9d .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.