syzbot


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

Status: fixed on 2018/03/23 18:14
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+92fa328176eb07e4ac1a@syzkaller.appspotmail.com
Fix commit: b954f94023dc l2tp: fix races with ipv4-mapped ipv6 addresses
First crash: 2404d, last: 2390d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.9 00/32] 4.9.250-rc1 review 33 (33) 2021/01/07 14:16
[PATCH 3.16 000/410] 3.16.57-rc1 review 426 (426) 2018/11/12 17:42
[PATCH 4.15 00/72] 4.15.16-stable review 78 (78) 2018/04/07 06:10
[PATCH 4.14 00/67] 4.14.33-stable review 71 (71) 2018/04/06 22:10
[PATCH net v3 0/2] l2tp: fix races with ipv4-mapped ipv6 addresses 5 (5) 2018/03/12 19:11
[PATCH net v2 0/2] l2tp: fix races with ipv4-mapped ipv6 addresses 10 (10) 2018/03/12 17:11
[PATCH net 0/2] l2tp: fix races with ipv4-mapped ipv6 addresses 5 (5) 2018/03/09 08:26
KASAN: slab-out-of-bounds Read in ip6_xmit (2) 0 (1) 2018/03/07 06:59
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ip6_xmit (3) net C 69 2285d 2327d 8/28 fixed on 2018/07/09 18:05
upstream KASAN: slab-out-of-bounds Read in ip6_xmit net C 156 2406d 2456d 4/28 fixed on 2018/03/06 13:29
android-44 KASAN: slab-out-of-bounds Read in ip6_xmit C 404 2228d 2004d 0/2 public: reported C repro on 2019/04/11 08:44
android-49 KASAN: slab-out-of-bounds Read in ip6_xmit C 388 2228d 2003d 0/3 public: reported C repro on 2019/04/12 00:00

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in ip6_dst_idev include/net/ip6_fib.h:192 [inline]
BUG: KASAN: slab-out-of-bounds in ip6_xmit+0x1f76/0x2260 net/ipv6/ip6_output.c:264
Read of size 8 at addr ffff8801d8f08018 by task syzkaller469575/4639

CPU: 1 PID: 4639 Comm: syzkaller469575 Not tainted 4.16.0-rc5+ #357
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/0x24d lib/dump_stack.c:53
 print_address_description+0x73/0x250 mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report+0x23c/0x360 mm/kasan/report.c:412
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
 ip6_dst_idev include/net/ip6_fib.h:192 [inline]
 ip6_xmit+0x1f76/0x2260 net/ipv6/ip6_output.c:264
 inet6_csk_xmit+0x2fc/0x580 net/ipv6/inet6_connection_sock.c:139
 l2tp_xmit_core net/l2tp/l2tp_core.c:1053 [inline]
 l2tp_xmit_skb+0x105f/0x1410 net/l2tp/l2tp_core.c:1148
 pppol2tp_sendmsg+0x470/0x670 net/l2tp/l2tp_ppp.c:341
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg+0xca/0x110 net/socket.c:640
 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2046
 __sys_sendmsg+0xe5/0x210 net/socket.c:2080
 SYSC_sendmsg net/socket.c:2091 [inline]
 SyS_sendmsg+0x2d/0x50 net/socket.c:2087
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4429a9
RSP: 002b:00007ffee0431108 EFLAGS: 00000217 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004429a9
RDX: 0000000000000081 RSI: 000000002037ffc8 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000020 R09: 0000000000000020
R10: 0000000000000020 R11: 0000000000000217 R12: 0000000000006cfb
R13: 00000000006cf448 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 3097:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489
 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3541
 getname_flags+0xcb/0x580 fs/namei.c:138
 user_path_at_empty+0x2d/0x50 fs/namei.c:2569
 user_path_at include/linux/namei.h:57 [inline]
 SYSC_faccessat fs/open.c:384 [inline]
 SyS_faccessat+0x237/0x6b0 fs/open.c:353
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 3097:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
 __cache_free mm/slab.c:3485 [inline]
 kmem_cache_free+0x83/0x2a0 mm/slab.c:3743
 putname+0xee/0x130 fs/namei.c:258
 filename_lookup+0x315/0x500 fs/namei.c:2324
 user_path_at_empty+0x40/0x50 fs/namei.c:2569
 user_path_at include/linux/namei.h:57 [inline]
 SYSC_faccessat fs/open.c:384 [inline]
 SyS_faccessat+0x237/0x6b0 fs/open.c:353
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

The buggy address belongs to the object at ffff8801d8f08d00
 which belongs to the cache names_cache of size 4096
The buggy address is located 3304 bytes to the left of
 4096-byte region [ffff8801d8f08d00, ffff8801d8f09d00)
The buggy address belongs to the page:
page:ffffea000763c200 count:1 mapcount:0 mapping:ffff8801d8f08d00 index:0x0 compound_mapcount: 0
flags: 0x2fffc0000008100(slab|head)
raw: 02fffc0000008100 ffff8801d8f08d00 0000000000000000 0000000100000001
raw: ffffea0007636420 ffffea0006b1a2a0 ffff8801da5d6600 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801d8f07f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8801d8f07f80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
>ffff8801d8f08000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                            ^
 ffff8801d8f08080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801d8f08100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (259):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/17 13:02 upstream 8f5fd927c3a7 08dacaa0 .config console log report syz C ci-upstream-kasan-gce
2018/03/15 11:06 upstream 0aa3fdb8b3a6 08dacaa0 .config console log report syz C ci-upstream-kasan-gce
2018/03/14 19:17 upstream 3032f8c504d2 08dacaa0 .config console log report syz C ci-upstream-kasan-gce
2018/03/14 11:21 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz C ci-upstream-kasan-gce
2018/03/13 17:13 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz C ci-upstream-kasan-gce
2018/03/12 06:06 upstream abeb75218aeb 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/11 21:43 upstream abeb75218aeb 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/11 12:42 upstream 3266b5bd97ea 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/10 23:41 upstream 3266b5bd97ea 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/10 01:03 upstream 719ea86151f3 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/09 12:53 upstream 1b88accf6a65 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/09 11:16 upstream 1b88accf6a65 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/07 07:20 upstream ce380619fab9 c8a18476 .config console log report syz C ci-upstream-kasan-gce
2018/03/07 03:13 upstream ce380619fab9 c8a18476 .config console log report syz C ci-upstream-kasan-gce
2018/03/06 22:07 upstream ce380619fab9 c8a18476 .config console log report syz C ci-upstream-kasan-gce
2018/03/06 20:46 upstream ce380619fab9 c8a18476 .config console log report syz C ci-upstream-kasan-gce
2018/03/17 13:03 net-next-old 53794570049d 08dacaa0 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/15 11:32 net-next-old c292566a7779 08dacaa0 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/14 19:52 net-next-old a870a02cc963 08dacaa0 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/14 11:05 net-next-old be9fc0971a5c 08dacaa0 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/13 17:32 net-next-old 9ba32046fc2d 08dacaa0 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/13 15:59 net-next-old 9ba32046fc2d 08dacaa0 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/12 02:27 net-next-old f44b1886a5f8 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/11 21:26 net-next-old f44b1886a5f8 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/11 08:54 net-next-old f44b1886a5f8 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/10 23:26 net-next-old f44b1886a5f8 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/10 20:21 net-next-old f44b1886a5f8 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/09 12:38 net-next-old fd372a7a9e5e 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/09 10:10 net-next-old fd372a7a9e5e 36d1c454 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/07 00:10 net-next-old 0f3e9c97eb5a c8a18476 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/06 19:57 net-next-old 0f3e9c97eb5a c8a18476 .config console log report syz C ci-upstream-net-kasan-gce
2018/03/17 13:01 upstream 8f5fd927c3a7 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/15 12:00 upstream 0aa3fdb8b3a6 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/15 11:45 upstream 0aa3fdb8b3a6 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/14 20:08 upstream 3032f8c504d2 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/14 19:10 upstream 3032f8c504d2 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/14 11:28 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/14 04:56 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/14 02:41 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/13 17:46 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/13 17:18 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/13 16:43 upstream fc6eabbbf8ef 08dacaa0 .config console log report syz ci-upstream-kasan-gce-386
2018/03/12 11:17 upstream 0c8efd610b58 f505ca4b .config console log report syz ci-upstream-kasan-gce-386
2018/03/12 06:15 upstream abeb75218aeb 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/12 03:30 upstream abeb75218aeb 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/12 02:47 upstream abeb75218aeb 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/11 22:03 upstream abeb75218aeb 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/11 15:21 upstream 3266b5bd97ea 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/11 12:41 upstream 3266b5bd97ea 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/11 09:27 upstream 3266b5bd97ea 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/11 09:11 upstream 3266b5bd97ea 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/10 23:40 upstream 3266b5bd97ea 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/10 20:35 upstream cdb06e9d8f52 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/10 04:55 upstream 719ea86151f3 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/10 01:01 upstream 719ea86151f3 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/09 14:18 upstream 1b88accf6a65 36d1c454 .config console log report syz ci-upstream-kasan-gce-386
2018/03/07 03:14 upstream ce380619fab9 c8a18476 .config console log report syz ci-upstream-kasan-gce-386
2018/03/18 18:44 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/17 04:49 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/16 10:28 upstream e2c15aff5f35 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/16 04:23 upstream e2c15aff5f35 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/16 00:33 upstream e2c15aff5f35 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/15 20:00 upstream 0aa3fdb8b3a6 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/15 16:39 upstream 0aa3fdb8b3a6 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/15 14:42 upstream 0aa3fdb8b3a6 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/10 07:19 upstream 719ea86151f3 36d1c454 .config console log report ci-upstream-kasan-gce
2018/03/20 21:28 upstream 1b5f3ba415fe 72c33b66 .config console log report ci-upstream-kasan-gce-386
2018/03/15 05:30 upstream 3032f8c504d2 08dacaa0 .config console log report ci-upstream-kasan-gce-386
2018/03/14 23:39 net-next-old a870a02cc963 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/14 22:15 net-next-old a870a02cc963 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/14 18:19 net-next-old a870a02cc963 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/14 16:31 net-next-old a870a02cc963 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/14 13:00 net-next-old a870a02cc963 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/14 10:46 net-next-old be9fc0971a5c 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/14 08:18 net-next-old be9fc0971a5c 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 23:35 net-next-old be9fc0971a5c 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 21:51 net-next-old 9ba32046fc2d 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 20:26 net-next-old 9ba32046fc2d 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 13:32 net-next-old 9ba32046fc2d 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 12:23 net-next-old 9ba32046fc2d 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 11:11 net-next-old 9ba32046fc2d 08dacaa0 .config console log report ci-upstream-net-kasan-gce
2018/03/13 02:10 net-next-old 129cf5f7f196 f505ca4b .config console log report ci-upstream-net-kasan-gce
2018/03/12 09:22 net-next-old 8b4c6ed2ed0e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/12 08:12 net-next-old 8b4c6ed2ed0e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/11 12:03 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/11 10:50 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/11 07:10 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/11 05:04 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/11 02:52 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/10 19:14 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/10 17:31 net-next-old f44b1886a5f8 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 12:18 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 11:01 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 10:51 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 09:49 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 08:59 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 07:30 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 06:34 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 05:03 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/09 03:03 net-next-old fd372a7a9e5e 36d1c454 .config console log report ci-upstream-net-kasan-gce
2018/03/07 12:09 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 11:11 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 11:02 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 08:35 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 08:35 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 08:01 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 04:50 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 04:06 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 03:55 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 03:52 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 03:51 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/07 02:48 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
2018/03/06 19:16 net-next-old 0f3e9c97eb5a c8a18476 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.