scsi: core: Fix possible memory leak if device_add() fails (Linux Linux)

CVE-2023-53174
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.16 % · percentile 5 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Analyzed

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: core: Fix possible memory leak if device_add() fails If device_add() returns error, the name allocated by dev_set_name() needs be freed. As the comment of device_add() says, put_device() should be used to decrease the reference count in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanp().

Weaknesses (CWE)

  • CWE-401 — Missing Release of Memory after Effective Lifetime

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected ee959b00c335d7780136c5abda37809191fe52c3 < 63956ad27a6882f01fea7c69e17823090f4c7b3f ; affected ee959b00c335d7780136c5abda37809191fe52c3 < 06c5340858011aa1195aec43a776e3185fbf7f56 ; affected ee959b00c335d7780136c5abda37809191fe52c3 < e12fac07f61caac9c5b186d827658b3470787619 ; affected ee959b00c335d7780136c5abda37809191fe52c3 < aa9a76d5ffdecd3b52ac333eb89361b0c9fe04e8 ; affected ee959b00c335d7780136c5abda37809191fe52c3 < 6bc7f4c8c27d526f968788b8a985896755b1df35 ; affected ee959b00c335d7780136c5abda37809191fe52c3 < b191ff1f075c4875f11271cbf0093e6e044a12aa
Linux · Linuxaffected 2.6.26 ; unaffected 0 < 2.6.26 ; unaffected 4.14.323 ≤ 4.14.* ; unaffected 4.19.292 ≤ 4.19.* ; unaffected 5.4.254 ≤ 5.4.* ; unaffected 5.10.191 ≤ 5.10.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD