syzbot


memory leak in kobject_set_name_vargs

Status: fixed on 2019/07/10 21:40
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+7fddca22578bc67c3fe4@syzkaller.appspotmail.com
Fix commit: 4f488fbca2a8 cfg80211: fix memory leak of wiphy device name
First crash: 1841d, last: 1807d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 3.16 00/87] 3.16.75-rc1 review 99 (99) 2019/11/19 14:49
[PATCH 4.9 000/102] 4.9.185-stable review 108 (108) 2019/07/10 06:11
[PATCH 4.4 00/73] 4.4.185-stable review 79 (79) 2019/07/10 06:10
[PATCH 4.19 00/90] 4.19.56-stable review 99 (99) 2019/06/26 10:22
[PATCH 5.1 000/121] 5.1.15-stable review 133 (133) 2019/06/26 00:51
[PATCH 4.14 00/51] 4.14.130-stable review 56 (56) 2019/06/25 09:59
[PATCH] cfg80211: fix memory leak of wiphy device name 1 (1) 2019/06/10 20:02
memory leak in kobject_set_name_vargs 0 (1) 2019/05/29 16:28
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in kobject_set_name_vargs (3) nilfs C 19 1304d 1360d 15/28 fixed on 2020/11/16 12:12
upstream memory leak in kobject_set_name_vargs (5) nilfs C 4 618d 720d 22/28 fixed on 2023/02/24 13:51
upstream memory leak in kobject_set_name_vargs (2) C done 47 1601d 1785d 15/28 fixed on 2020/02/18 14:31
upstream memory leak in kobject_set_name_vargs (4) kernel C 171 1012d 1299d 20/28 fixed on 2021/11/10 00:51

Sample crash report:
BUG: memory leak
unreferenced object 0xffff8881189e20a0 (size 32):
  comm "syz-executor763", pid 6993, jiffies 4294943151 (age 8.350s)
  hex dump (first 32 bytes):
    62 6f 6e 64 30 00 00 00 00 00 00 00 00 00 00 00  bond0...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000856cc2c7>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
    [<00000000856cc2c7>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000856cc2c7>] slab_alloc mm/slab.c:3326 [inline]
    [<00000000856cc2c7>] __do_kmalloc mm/slab.c:3658 [inline]
    [<00000000856cc2c7>] __kmalloc_track_caller+0x15d/0x2c0 mm/slab.c:3675
    [<00000000d3ea9156>] kstrdup+0x3a/0x70 mm/util.c:52
    [<00000000b8644a57>] kstrdup_const+0x48/0x60 mm/util.c:74
    [<00000000335051c2>] kvasprintf_const+0x7e/0xe0 lib/kasprintf.c:48
    [<000000002b24d8b6>] kobject_set_name_vargs+0x40/0xe0 lib/kobject.c:289
    [<00000000b6a73548>] dev_set_name+0x63/0x90 drivers/base/core.c:1915
    [<000000003ffaab43>] netdev_register_kobject+0x5a/0x1b0 net/core/net-sysfs.c:1727
    [<000000006fa8690c>] register_netdevice+0x397/0x600 net/core/dev.c:8733
    [<00000000d91c4b17>] bond_newlink drivers/net/bonding/bond_netlink.c:449 [inline]
    [<00000000d91c4b17>] bond_newlink+0x41/0x80 drivers/net/bonding/bond_netlink.c:439
    [<00000000b811933f>] __rtnl_newlink+0x892/0xb30 net/core/rtnetlink.c:3187
    [<00000000b75b8ba8>] rtnl_newlink+0x4e/0x80 net/core/rtnetlink.c:3245
    [<00000000b2551c97>] rtnetlink_rcv_msg+0x178/0x4b0 net/core/rtnetlink.c:5214
    [<000000003ef80388>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2482
    [<000000000e4a4779>] rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5232
    [<000000007e424066>] netlink_unicast_kernel net/netlink/af_netlink.c:1307 [inline]
    [<000000007e424066>] netlink_unicast+0x1ec/0x2d0 net/netlink/af_netlink.c:1333
    [<0000000025d14354>] netlink_sendmsg+0x26a/0x480 net/netlink/af_netlink.c:1922


Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/02 06:31 upstream 6fbc7275c7a9 cccc4302 .config console log report syz C ci-upstream-gce-leak
2019/06/29 12:02 upstream 556e2f6020bf 7509bf36 .config console log report syz C ci-upstream-gce-leak
2019/06/28 02:15 upstream 249155c20f9b 7509bf36 .config console log report syz C ci-upstream-gce-leak
2019/06/27 16:19 upstream 249155c20f9b 7509bf36 .config console log report syz C ci-upstream-gce-leak
2019/06/24 11:40 upstream 241e39004581 472f0082 .config console log report syz C ci-upstream-gce-leak
2019/06/21 21:38 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-gce-leak
2019/06/21 12:30 upstream abf02e2964b3 34bf9440 .config console log report syz C ci-upstream-gce-leak
2019/06/15 17:58 upstream 0011572c8830 442206d7 .config console log report syz C ci-upstream-gce-leak
2019/06/10 10:40 upstream d1fdb6d8f6a4 0159583c .config console log report syz C ci-upstream-gce-leak
2019/06/05 20:36 upstream 788a024921c4 bfb4a51e .config console log report syz C ci-upstream-gce-leak
2019/06/02 03:28 upstream 3ab4436f688c 53c81ea5 .config console log report syz C ci-upstream-gce-leak
2019/05/29 11:06 upstream 9fb67d643f6f 6bd61501 .config console log report syz C ci-upstream-gce-leak
* Struck through repros no longer work on HEAD.