null_blk: free global tag_set on init error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 82f402fefa50f1675bf918bcd009981bd6b30ac8 · < 5a1c5ff3a49ba93a1fd0b70537e7a0164071760d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
null_blk: free global tag_set on init error path
If shared_tags is enabled, null_setup_tagset() allocates the global tag_set via null_init_global_tag_set(). If device creation later fails, err_dev destroys the default devices and calls unregister_blkdev(), but never frees the global tag_set. Since module init failed, null_exit() is never invoked, so the global tag_set's tags and maps are permanently leaked.
Free the global tag_set in err_dev, matching null_exit() which does if (tag_set.ops) blk_mq_free_tag_set(&tag_set).
From the CVE record · Linux
The Linux kernel's null_blk module leaks its global tag_set if shared_tags is enabled and device creation fails during module initialization. The leaked tags and maps are not freed because module cleanup does not run after initialization fails. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel with the null_blk module should check their version; affected versions are not specified.