syzkaller cannot detect memory leak auto in my pci driver?

6 views
Skip to first unread message

erdong zhang

unread,
Sep 18, 2025, 10:07:42 PM (10 days ago) Sep 18
to syzkaller
Hi, 
In my pcie driver, I added a memory leak when open my pci device, the memory leak code are as follows,  it will make a mem leak everytime when call syscall open.
```
diff --git a/kmd/itr/kmdlib/itr_fops.c b/kmd/itr/kmdlib/itr_fops.c
index 02350ee07..b80afee49 100644
--- a/kmd/itr/kmdlib/itr_fops.c
+++ b/kmd/itr/kmdlib/itr_fops.c
@@ -2310,6 +2310,7 @@ i32 itr_lib_open(void *file, int minor, void **private_data)
 {
        struct itr_lib_device *lib_dev;
        struct itr_vdev *vdev;
+       void *leak_mem = NULL;

        /* Find the itr */
        lib_dev = find_lib_dev(minor);
@@ -2324,6 +2325,7 @@ i32 itr_lib_open(void *file, int minor, void **private_data)
        vdev->file = file;
        *private_data = vdev;

+       leak_mem = os_mem_kzalloc(1024);
        return 0;
 }
```
My linux kernel config has enabled the following config of kmemleak.

```
 CONFIG_HAVE_DEBUG_KMEMLEAK=y
 CONFIG_DEBUG_KMEMLEAK=y
 CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
 # CONFIG_DEBUG_KMEMLEAK_TEST is not set
 # CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
 CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
```
When i run syzkaller test, i ssh to the qemu vm, the dmesg shows the kmemleak thread is enabled,  but the kmemleak thread has been ended  ensue.
```
➜  ~ dmesg | grep kmem
[   19.269533] kmemleak: Kernel memory leak detector initialized (mem pool available: 12791)
[   19.269573] kmemleak: Automatic memory scanning thread started
[   40.055436] kmemleak: Automatic memory scanning thread ended
```
Any help is appreciated.

Dmitry Vyukov

unread,
Sep 19, 2025, 4:56:02 AM (10 days ago) Sep 19
to erdong zhang, syzkaller
Hi erdong,

Leak checking broke some time ago:
https://github.com/google/syzkaller/issues/4728
Nobody debugged yet what exactly part broke.

erdong zhang

unread,
Sep 21, 2025, 10:45:45 PM (7 days ago) Sep 21
to syzkaller
Hi  Dmitry,
thank you very much.
Reply all
Reply to author
Forward
0 new messages