syzbot


KASAN: use-after-free Read in eth_type_trans

Status: upstream: reported C repro on 2019/12/19 12:15
Reported-by: syzbot+5a78f0fe1772573bafdd@syzkaller.appspotmail.com
First crash: 1588d, last: 1317d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in eth_type_trans net C done error 3 1442d 1584d 15/26 fixed on 2020/12/23 11:40
Fix bisection attempts (10)
Created Duration User Patch Repo Result
2020/10/15 11:10 3m bisect fix linux-4.19.y error job log (0)
2020/09/15 10:47 22m bisect fix linux-4.19.y job log (0) log
2020/08/15 15:56 26m bisect fix linux-4.19.y job log (0) log
2020/07/16 15:23 26m bisect fix linux-4.19.y job log (0) log
2020/06/16 14:58 24m bisect fix linux-4.19.y job log (0) log
2020/05/17 14:29 28m bisect fix linux-4.19.y job log (0) log
2020/04/17 14:04 24m bisect fix linux-4.19.y job log (0) log
2020/03/18 13:38 26m bisect fix linux-4.19.y job log (0) log
2020/02/17 12:44 26m bisect fix linux-4.19.y job log (0) log
2020/01/18 12:14 25m bisect fix linux-4.19.y job log (0) log

Sample crash report:
audit: type=1400 audit(1576757525.881:39): avc:  denied  { read } for  pid=7796 comm="syz-executor446" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1
==================================================================
BUG: KASAN: use-after-free in is_multicast_ether_addr_64bits include/linux/etherdevice.h:139 [inline]
BUG: KASAN: use-after-free in eth_type_trans+0x6dd/0x770 net/ethernet/eth.c:168
Read of size 8 at addr ffff8880877f0040 by task syz-executor446/7796

CPU: 1 PID: 7796 Comm: syz-executor446 Not tainted 4.19.90-syzkaller #0
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+0x197/0x210 lib/dump_stack.c:118
 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report mm/kasan/report.c:412 [inline]
 kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
 is_multicast_ether_addr_64bits include/linux/etherdevice.h:139 [inline]
 eth_type_trans+0x6dd/0x770 net/ethernet/eth.c:168
 napi_frags_finish net/core/dev.c:5703 [inline]
 napi_gro_frags+0x6ad/0xa20 net/core/dev.c:5777
 tun_get_user+0x2f08/0x4c30 drivers/net/tun.c:1939
 tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:1985
 call_write_iter include/linux/fs.h:1820 [inline]
 do_iter_readv_writev+0x558/0x830 fs/read_write.c:681
 do_iter_write fs/read_write.c:960 [inline]
 do_iter_write+0x184/0x5f0 fs/read_write.c:941
 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1005
 do_writev+0x15e/0x370 fs/read_write.c:1040
 __do_sys_writev fs/read_write.c:1113 [inline]
 __se_sys_writev fs/read_write.c:1110 [inline]
 __x64_sys_writev+0x75/0xb0 fs/read_write.c:1110
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441800
Code: 05 48 3d 01 f0 ff ff 0f 83 fd 0e fc ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 83 3d 51 9c 29 00 00 75 14 b8 14 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 d4 0e fc ff c3 48 83 ec 08 e8 9a 2b 00 00
RSP: 002b:00007ffe87059608 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441800
RDX: 0000000000000001 RSI: 00007ffe87059660 RDI: 00000000000000f0
RBP: 00007ffe87059630 R08: 0000000000000000 R09: 0000000000000020
R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000004 R14: 00007ffe870596b0 R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea00021dfc00 count:0 mapcount:0 mapping:0000000000000000 index:0x1
flags: 0xfffe0000000000()
raw: 00fffe0000000000 dead000000000100 dead000000000200 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880877eff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880877eff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880877f0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                           ^
 ffff8880877f0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880877f0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/19 12:14 linux-4.19.y 7d120bf21c05 79b211f7 .config console log report syz C ci2-linux-4-19
* Struck through repros no longer work on HEAD.