[bug report] kmemleak observed during nvme connect with host authentication and invalid ctrl key(blktests nvme/044)
Yi Zhang
yi.zhang at redhat.com
Sat May 11 03:19:17 PDT 2024
Hi
The kmemleak was triggered from Step 4 in nvme/044, please help check
it and let me know if you need any info/test for it, thanks.
blktests: ./check nvme/044
# Step 4: Connect with host authentication
# and invalid ctrl key
echo "Test invalid ctrl key (should fail)"
invkey="DHHC-1:00:Jc/My1o0qtLCWRp+sHhAVafdfaS7YQOMYhk9zSmlatobqB8C:"
_nvme_connect_subsys --dhchap-secret "${hostkey}" \
--dhchap-ctrl-secret "${invkey}"
_nvme_disconnect_subsys
dmesg:
[ 1624.248073] run blktests nvme/044 at 2024-05-11 05:59:21
[ 1624.842961] nvmet: adding nsid 1 to subsystem blktests-subsystem-1
[ 1625.165556] key crc mismatch (key 021fa81b, crc e08833d2)
kmemleak:
unreferenced object 0xffff88a89a0fa800 (size 512):
comm "nvme", pid 21764, jiffies 4298599713
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ff ff ff ff ff ff 20 29 32 bc ff ff ff ff ........ )2.....
backtrace (crc 5582e1c1):
[<00000000e6877e1c>] kmalloc_trace+0x338/0x420
[<00000000074bbdf4>] device_add+0xb09/0x1760
[<00000000a4cc674f>] cdev_device_add+0xf7/0x230
[<00000000903919a1>] nvme_init_ctrl+0xc65/0x1220 [nvme_core]
[<00000000f315c00e>]
__kstrtab_nvme_keyring_id+0x1/0xfffffffffff4b654 [nvme_keyring]
[<00000000e20dd92c>] 0xffffffffc1d3c760
[<0000000077b20bbe>] vfs_write+0x20e/0x1010
[<00000000986b0494>] ksys_write+0xfb/0x1d0
[<000000008207ad01>] do_syscall_64+0x97/0x190
[<00000000888f4e53>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
unreferenced object 0xffff88a8b2df4400 (size 512):
comm "nvme", pid 30780, jiffies 4303376974
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ff ff ff ff ff ff 20 29 32 bc ff ff ff ff ........ )2.....
backtrace (crc 2990f85a):
[<00000000e6877e1c>] kmalloc_trace+0x338/0x420
[<00000000074bbdf4>] device_add+0xb09/0x1760
[<00000000a4cc674f>] cdev_device_add+0xf7/0x230
[<00000000903919a1>] nvme_init_ctrl+0xc65/0x1220 [nvme_core]
[<000000004d96fd53>] 0xffffffffc1d6457f
[<000000009aeccf81>] 0xffffffffc1d35760
[<0000000077b20bbe>] vfs_write+0x20e/0x1010
[<00000000986b0494>] ksys_write+0xfb/0x1d0
[<000000008207ad01>] do_syscall_64+0x97/0x190
[<00000000888f4e53>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
--
Best Regards,
Yi Zhang
More information about the Linux-nvme
mailing list