syzbot


memory leak in packet_set_ring

Status: fixed on 2019/07/29 13:39
Subsystems: net
[Documentation on labels]
Fix commit: 55655e3d1197 net/packet: fix memory leak in packet_set_ring()
First crash: 1859d, last: 1855d

Sample crash report:
executing program
executing program
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff88810a807c80 (size 32):
  comm "syz-executor495", pid 7002, jiffies 4294947340 (age 13.950s)
  hex dump (first 32 bytes):
    00 00 e0 1c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000b854d546>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
    [<00000000b854d546>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000b854d546>] slab_alloc mm/slab.c:3326 [inline]
    [<00000000b854d546>] __do_kmalloc mm/slab.c:3658 [inline]
    [<00000000b854d546>] __kmalloc+0x161/0x2c0 mm/slab.c:3669
    [<00000000d5a5b57a>] kmalloc_array include/linux/slab.h:670 [inline]
    [<00000000d5a5b57a>] kcalloc include/linux/slab.h:681 [inline]
    [<00000000d5a5b57a>] alloc_pg_vec net/packet/af_packet.c:4213 [inline]
    [<00000000d5a5b57a>] packet_set_ring+0x1fb/0x8b0 net/packet/af_packet.c:4302
    [<00000000781e4f7b>] packet_setsockopt+0x273/0x1160 net/packet/af_packet.c:3658
    [<00000000a1a4fec5>] __sys_setsockopt+0x98/0x120 net/socket.c:2072
    [<0000000076dd3088>] __do_sys_setsockopt net/socket.c:2083 [inline]
    [<0000000076dd3088>] __se_sys_setsockopt net/socket.c:2080 [inline]
    [<0000000076dd3088>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2080
    [<00000000001c689d>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<0000000081ef8fb4>] entry_SYSCALL_64_after_hwframe+0x44/0xa9


Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/27 10:06 upstream 249155c20f9b 7509bf36 .config console log report syz C ci-upstream-gce-leak
2019/06/23 00:01 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-gce-leak
* Struck through repros no longer work on HEAD.