CVE-2024-50153

Source
https://cve.org/CVERecord?id=CVE-2024-50153
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-50153.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-50153
Downstream
Related
Published
2024-11-07T09:31:29.791Z
Modified
2026-03-20T12:39:36.605291Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
scsi: target: core: Fix null-ptr-deref in target_alloc_device()
Details

In the Linux kernel, the following vulnerability has been resolved:

scsi: target: core: Fix null-ptr-deref in targetallocdevice()

There is a null-ptr-deref issue reported by KASAN:

BUG: KASAN: null-ptr-deref in targetallocdevice+0xbc4/0xbe0 [targetcoremod] ... kasanreport+0xb9/0xf0 targetallocdevice+0xbc4/0xbe0 [targetcoremod] coredevsetupvirtuallun0+0xef/0x1f0 [targetcoremod] targetcoreinitconfigfs+0x205/0x420 [targetcoremod] dooneinitcall+0xdd/0x4e0 ... entrySYSCALL64afterhwframe+0x76/0x7e

In targetallocdevice(), if allocing memory for dev queues fails, then dev will be freed by dev->transport->free_device(), but dev->transport is not initialized at that time, which will lead to a null pointer reference problem.

Fixing this bug by freeing dev with hba->backend->ops->free_device().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50153.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
008b936bbde3e87a611b3828a0d5d2a4f99026a0
Fixed
8c1e6717f60d31f8af3937c23c4f1498529584e1
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1526d9f10c6184031e42afad0adbdde1213e8ad1
Fixed
39e02fa90323243187c91bb3e8f2f5f6a9aacfc7
Fixed
895ab729425ef9bf3b6d2f8d0853abe64896f314
Fixed
b80e9bc85bd9af378e7eac83e15dd129557bbdb6
Fixed
14a6a2adb440e4ae97bee73b2360946bd033dadd
Fixed
fca6caeb4a61d240f031914413fcc69534f6dc03

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-50153.json"