syzbot


memory leak in __mdiobus_register

Status: fixed on 2022/03/08 16:11
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+398e7dc692ddbbb4cfec@syzkaller.appspotmail.com
Fix commit: ab609f25d198 net: mdiobus: Fix memory leak in __mdiobus_register ca6e11c337da phy: mdio: fix memory leak
First crash: 1171d, last: 1171d
Discussions (27)
Title Replies (including bot) Last reply
[PATCH 5.14 000/169] 5.14.15-rc1 review 180 (180) 2022/01/11 07:33
[PATCH 4.4 00/44] 4.4.290-rc1 review 49 (49) 2021/10/26 19:47
[PATCH 5.10 00/95] 5.10.76-rc1 review 106 (106) 2021/10/26 19:16
[PATCH 5.4 00/58] 5.4.156-rc1 review 64 (64) 2021/10/26 19:16
[PATCH 4.19 00/37] 4.19.214-rc1 review 43 (43) 2021/10/26 19:15
[PATCH 4.14 00/30] 4.14.253-rc1 review 33 (33) 2021/10/26 19:15
[PATCH 4.9 00/50] 4.9.288-rc1 review 55 (55) 2021/10/26 19:14
[PATCH 4.4 00/18] 4.4.289-rc1 review 23 (23) 2021/10/15 23:11
[PATCH 4.14 00/33] 4.14.251-rc1 review 38 (38) 2021/10/15 22:28
[PATCH 4.9 00/25] 4.9.287-rc1 review 30 (30) 2021/10/15 22:05
[PATCH 5.14 000/151] 5.14.12-rc1 review 161 (161) 2021/10/12 10:27
[PATCH 5.4 00/52] 5.4.153-rc1 review 65 (65) 2021/10/12 08:13
[PATCH 4.19 00/28] 4.19.211-rc1 review 34 (34) 2021/10/12 08:13
[PATCH 5.10 00/83] 5.10.73-rc1 review 89 (89) 2021/10/11 17:34
[PATCH 4.14 00/75] 4.14.249-rc1 review 81 (81) 2021/10/07 16:21
[PATCH AUTOSEL 5.14 01/40] ext4: check and update i_disksize properly 44 (44) 2021/10/06 15:12
[PATCH 5.4 00/56] 5.4.151-rc1 review 62 (62) 2021/10/05 06:56
[PATCH 4.9 00/57] 4.9.285-rc1 review 62 (62) 2021/10/05 06:54
[PATCH 4.19 00/95] 4.19.209-rc1 review 103 (103) 2021/10/05 06:47
[PATCH 5.14 000/172] 5.14.10-rc1 review 184 (184) 2021/10/05 06:41
[PATCH 5.10 00/93] 5.10.71-rc1 review 100 (100) 2021/10/05 02:40
[PATCH 4.4 00/41] 4.4.286-rc1 review 45 (45) 2021/10/05 02:13
[PATCH v4 1/2] Revert "net: mdiobus: Fix memory leak in __mdiobus_register" 3 (3) 2021/10/01 00:40
[PATCH v3 1/2] Revert "net: mdiobus: Fix memory leak in __mdiobus_register" 3 (3) 2021/09/30 06:45
[PATCH] phy: mdio: fix memory leak 8 (8) 2021/09/30 05:55
[PATCH] net: mdiobus: Fix memory leak in __mdiobus_register 23 (23) 2021/09/29 21:31
[syzbot] memory leak in __mdiobus_register 4 (6) 2021/09/28 15:39
Last patch testing requests (2)
Created Duration User Patch Repo Result
2021/09/28 07:20 8m mudongliangabcd@gmail.com patch upstream report log
2021/09/26 23:27 16m paskripkin@gmail.com patch upstream OK

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888114032e00 (size 256):
  comm "kworker/1:3", pid 2960, jiffies 4294943572 (age 15.920s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 08 2e 03 14 81 88 ff ff  ................
    08 2e 03 14 81 88 ff ff 90 76 65 82 ff ff ff ff  .........ve.....
  backtrace:
    [<ffffffff8265cfab>] kmalloc include/linux/slab.h:591 [inline]
    [<ffffffff8265cfab>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff8265cfab>] device_private_init drivers/base/core.c:3203 [inline]
    [<ffffffff8265cfab>] device_add+0x89b/0xdf0 drivers/base/core.c:3253
    [<ffffffff828dd643>] __mdiobus_register+0xc3/0x450 drivers/net/phy/mdio_bus.c:537
    [<ffffffff828cb835>] __devm_mdiobus_register+0x75/0xf0 drivers/net/phy/mdio_devres.c:87
    [<ffffffff82b92a00>] ax88772_init_mdio drivers/net/usb/asix_devices.c:676 [inline]
    [<ffffffff82b92a00>] ax88772_bind+0x330/0x480 drivers/net/usb/asix_devices.c:786
    [<ffffffff82baa33f>] usbnet_probe+0x3ff/0xdf0 drivers/net/usb/usbnet.c:1745
    [<ffffffff82c36e17>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<ffffffff82661d17>] call_driver_probe drivers/base/dd.c:517 [inline]
    [<ffffffff82661d17>] really_probe.part.0+0xe7/0x380 drivers/base/dd.c:596
    [<ffffffff826620bc>] really_probe drivers/base/dd.c:558 [inline]
    [<ffffffff826620bc>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:751
    [<ffffffff826621ba>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:781
    [<ffffffff82662a26>] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:898
    [<ffffffff8265eca7>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427
    [<ffffffff826625a2>] __device_attach+0x122/0x260 drivers/base/dd.c:969
    [<ffffffff82660916>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487
    [<ffffffff8265cd0b>] device_add+0x5fb/0xdf0 drivers/base/core.c:3359
    [<ffffffff82c343b9>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2170
    [<ffffffff82c4473c>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238

BUG: memory leak
unreferenced object 0xffff888116f06900 (size 32):
  comm "kworker/0:2", pid 2670, jiffies 4294944448 (age 7.160s)
  hex dump (first 32 bytes):
    75 73 62 2d 30 30 31 3a 30 30 33 00 00 00 00 00  usb-001:003.....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81484516>] kstrdup+0x36/0x70 mm/util.c:60
    [<ffffffff814845a3>] kstrdup_const+0x53/0x80 mm/util.c:83
    [<ffffffff82296ba2>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82358d4b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:289
    [<ffffffff826575f3>] dev_set_name+0x63/0x90 drivers/base/core.c:3147
    [<ffffffff828dd63b>] __mdiobus_register+0xbb/0x450 drivers/net/phy/mdio_bus.c:535
    [<ffffffff828cb835>] __devm_mdiobus_register+0x75/0xf0 drivers/net/phy/mdio_devres.c:87
    [<ffffffff82b92a00>] ax88772_init_mdio drivers/net/usb/asix_devices.c:676 [inline]
    [<ffffffff82b92a00>] ax88772_bind+0x330/0x480 drivers/net/usb/asix_devices.c:786
    [<ffffffff82baa33f>] usbnet_probe+0x3ff/0xdf0 drivers/net/usb/usbnet.c:1745
    [<ffffffff82c36e17>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<ffffffff82661d17>] call_driver_probe drivers/base/dd.c:517 [inline]
    [<ffffffff82661d17>] really_probe.part.0+0xe7/0x380 drivers/base/dd.c:596
    [<ffffffff826620bc>] really_probe drivers/base/dd.c:558 [inline]
    [<ffffffff826620bc>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:751
    [<ffffffff826621ba>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:781
    [<ffffffff82662a26>] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:898
    [<ffffffff8265eca7>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427
    [<ffffffff826625a2>] __device_attach+0x122/0x260 drivers/base/dd.c:969


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/22 01:18 upstream d9fb678414c0 169724fe .config console log report syz C ci-upstream-gce-leak memory leak in __mdiobus_register
* Struck through repros no longer work on HEAD.