syzbot


KASAN: slab-out-of-bounds Read in _decode_session6 (2)

Status: auto-obsoleted due to no activity on 2022/09/01 19:57
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+240f9766d6be3d69431e@syzkaller.appspotmail.com
First crash: 1966d, last: 1945d
Cause bisection: introduced by (bisect log) :
commit 64fd1c7040880292710e6592ddc88d0d73cfb6fb
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date: Mon Jun 12 20:48:41 2017 +0000

  ACPI / PM: Run wakeup notify handlers synchronously

Crash: INFO: trying to register non-static key in can_notifier (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) [no-op commit]:
commit 62c7139f3ed011379fbbef832b4b15e3c10b355f
Author: Hans Wippel <hwippel@linux.ibm.com>
Date: Thu Feb 7 14:56:17 2019 +0000

  net/smc: unlock LGR pending lock earlier for SMC-D

  
Discussions (3)
Title Replies (including bot) Last reply
Reminder: 26 open syzbot bugs in "net/xfrm" subsystem 1 (1) 2019/07/24 01:42
Reminder: 27 open syzbot bugs in "net/xfrm" subsystem 1 (1) 2019/06/25 05:51
KASAN: slab-out-of-bounds Read in _decode_session6 (2) 1 (3) 2019/03/21 23:21
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in _decode_session6 1 1402d 1402d 0/1 auto-closed as invalid on 2020/09/13 07:38
linux-4.19 KASAN: slab-out-of-bounds Read in _decode_session6 23 818d 1472d 0/1 auto-closed as invalid on 2022/04/20 21:31
upstream KASAN: slab-out-of-bounds Read in _decode_session6 net C 35 1967d 2025d 11/26 fixed on 2018/10/30 01:28
linux-4.14 KASAN: slab-out-of-bounds Read in _decode_session6 (2) 2 680d 699d 0/1 auto-obsoleted due to no activity on 2022/09/05 20:15
android-414 KASAN: slab-out-of-bounds Read in _decode_session6 C 42 1946d 1804d 0/1 public: reported C repro on 2019/04/11 00:00
linux-4.19 KASAN: slab-out-of-bounds Read in _decode_session6 (2) C error 3 406d 547d 0/1 upstream: reported C repro on 2022/09/19 04:38
Last patch testing requests (8)
Created Duration User Patch Repo Result
2022/09/01 16:27 14m retest repro upstream OK log
2022/08/31 07:27 14m retest repro linux-next OK log
2022/08/30 21:27 16m retest repro upstream OK log
2022/08/30 16:27 14m retest repro bpf OK log
2022/08/30 16:27 14m retest repro net-next-old OK log
2022/08/30 16:27 14m retest repro bpf-next OK log
2022/08/30 16:27 15m retest repro upstream OK log
2022/08/30 16:27 15m retest repro net-old OK log

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device team0
==================================================================
BUG: KASAN: slab-out-of-bounds in _decode_session6+0x134a/0x1500 net/ipv6/xfrm6_policy.c:161
Read of size 1 at addr ffff8801cc9bc487 by task syz-executor171/5694

CPU: 1 PID: 5694 Comm: syz-executor171 Not tainted 4.19.0+ #88
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+0x244/0x39d lib/dump_stack.c:113
 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430
 _decode_session6+0x134a/0x1500 net/ipv6/xfrm6_policy.c:161
 __xfrm_decode_session+0x71/0x140 net/xfrm/xfrm_policy.c:2299
 xfrm_decode_session include/net/xfrm.h:1232 [inline]
 vti6_tnl_xmit+0x3fc/0x1c10 net/ipv6/ip6_vti.c:542
 __netdev_start_xmit include/linux/netdevice.h:4336 [inline]
 netdev_start_xmit include/linux/netdevice.h:4345 [inline]
 xmit_one net/core/dev.c:3252 [inline]
 dev_hard_start_xmit+0x295/0xc90 net/core/dev.c:3268
 __dev_queue_xmit+0x2f71/0x3ad0 net/core/dev.c:3838
 dev_queue_xmit+0x17/0x20 net/core/dev.c:3871
 __bpf_tx_skb net/core/filter.c:2017 [inline]
 __bpf_redirect_common net/core/filter.c:2055 [inline]
 __bpf_redirect+0x5cf/0xb20 net/core/filter.c:2062
 ____bpf_clone_redirect net/core/filter.c:2095 [inline]
 bpf_clone_redirect+0x2f6/0x490 net/core/filter.c:2067
 bpf_prog_c39d1ba309a769f7+0x881/0x1000

Allocated by task 5694:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:448
 set_track mm/kasan/kasan.c:460 [inline]
 kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553
 __do_kmalloc_node mm/slab.c:3684 [inline]
 __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3698
 __kmalloc_reserve.isra.40+0x41/0xe0 net/core/skbuff.c:137
 pskb_expand_head+0x230/0x10f0 net/core/skbuff.c:1460
 skb_ensure_writable+0x3dd/0x640 net/core/skbuff.c:5071
 __bpf_try_make_writable net/core/filter.c:1638 [inline]
 bpf_try_make_writable net/core/filter.c:1644 [inline]
 bpf_try_make_head_writable net/core/filter.c:1652 [inline]
 ____bpf_clone_redirect net/core/filter.c:2089 [inline]
 bpf_clone_redirect+0x14a/0x490 net/core/filter.c:2067
 bpf_prog_c39d1ba309a769f7+0x881/0x1000

Freed by task 4310:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:448
 set_track mm/kasan/kasan.c:460 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521
 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528
 __cache_free mm/slab.c:3498 [inline]
 kfree+0xcf/0x230 mm/slab.c:3817
 load_elf_binary+0x25b4/0x5620 fs/binfmt_elf.c:1118
 search_binary_handler+0x17d/0x570 fs/exec.c:1653
 exec_binprm fs/exec.c:1695 [inline]
 __do_execve_file.isra.33+0x1661/0x25d0 fs/exec.c:1819
 do_execveat_common fs/exec.c:1866 [inline]
 do_execve fs/exec.c:1883 [inline]
 __do_sys_execve fs/exec.c:1964 [inline]
 __se_sys_execve fs/exec.c:1959 [inline]
 __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8801cc9bc280
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 7 bytes to the right of
 512-byte region [ffff8801cc9bc280, ffff8801cc9bc480)
The buggy address belongs to the page:
page:ffffea0007326f00 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0
flags: 0x2fffc0000000200(slab)
raw: 02fffc0000000200 ffffea000734e788 ffffea0007302848 ffff8801da800940
raw: 0000000000000000 ffff8801cc9bc000 0000000100000006 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801cc9bc380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8801cc9bc400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8801cc9bc480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff8801cc9bc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801cc9bc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/10/30 21:04 upstream 11743c56785c 8dbb755a .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/10/30 20:10 upstream 11743c56785c 8dbb755a .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/10/30 15:24 upstream 11743c56785c 8dbb755a .config console log report syz C ci-upstream-kasan-gce-root
2018/10/30 15:24 net-old da71577545a5 8dbb755a .config console log report syz C ci-upstream-net-this-kasan-gce
2018/10/30 14:58 bpf d8fd9e106fbc 8dbb755a .config console log report syz C ci-upstream-bpf-kasan-gce
2018/10/30 15:23 bpf-next 44adbac8f721 8dbb755a .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/10/30 15:22 net-next-old 4b42745211af 8dbb755a .config console log report syz C ci-upstream-net-kasan-gce
2018/10/30 15:23 linux-next 6201f31a39f8 8dbb755a .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/07 04:05 upstream 8053e5b93eca 8bd6bd63 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/05 00:46 upstream 4710e78940d8 8bd6bd63 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/02 20:15 upstream d81f50bd3464 8bd6bd63 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/18 12:52 bpf 569a933b03f3 adf636a8 .config console log report ci-upstream-bpf-kasan-gce
2018/11/16 21:35 bpf da85d8bfd151 b08ee62a .config console log report ci-upstream-bpf-kasan-gce
2018/11/15 23:56 bpf da85d8bfd151 3a41052e .config console log report ci-upstream-bpf-kasan-gce
2018/11/14 22:01 bpf da85d8bfd151 5f5f6d14 .config console log report ci-upstream-bpf-kasan-gce
2018/10/31 01:04 bpf 27b31e68bc9f 4ccf7bb4 .config console log report ci-upstream-bpf-kasan-gce
2018/10/30 13:27 bpf d8fd9e106fbc 8dbb755a .config console log report ci-upstream-bpf-kasan-gce
2018/11/20 20:05 bpf-next 740baecd811f 9aca6b52 .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/20 06:58 bpf-next bbe5d311be66 9bc2a903 .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/19 23:42 bpf-next 592ee43faf86 adf636a8 .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/17 20:58 bpf-next 592ee43faf86 adf636a8 .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/17 17:36 bpf-next 592ee43faf86 b08ee62a .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/16 20:37 bpf-next 407be8d03e20 b08ee62a .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/16 07:54 bpf-next 407be8d03e20 f5e275d1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/11/10 00:20 bpf-next c8123ead13a5 f9815aaf .config console log report ci-upstream-bpf-next-kasan-gce
2018/10/30 18:42 bpf-next 44adbac8f721 8dbb755a .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.