{"id":"CVE-2023-52929","state":"PUBLISHED","title":"nvmem: core: fix cleanup after dev_set_name()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmem: core: fix cleanup after dev_set_name()\n\nIf dev_set_name() fails, we leak nvmem->wp_gpio as the cleanup does not\nput this. While a minimal fix for this would be to add the gpiod_put()\ncall, we can do better if we split device_register(), and use the\ntested nvmem_release() cleanup code by initialising the device early,\nand putting the device.\n\nThis results in a slightly larger fix, but results in clear code.\n\nNote: this patch depends on \"nvmem: core: initialise nvmem->id early\"\nand \"nvmem: core: remove nvmem_config wp_gpio\".\n\n[Srini: Fixed subject line and error code handing with wp_gpio while applying.]","publishedAt":"2025-03-27T16:37:11.396Z","updatedAt":"2026-05-11T19:35:54.530Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a19a0f67dbb89ad2bfc466f2003841acba645884","status":"affected","lessThan":"23676ecd2eb377f7c24a6ff578b0f4c7135658b6","versionType":"git"},{"version":"14eea6449473c1f55e196cc104ba16d144465869","status":"affected","lessThan":"8f9c4b2a3b132bf6698e477aba6ee194b40c75f4","versionType":"git"},{"version":"5544e90c81261e82e02bbf7c6015a4b9c8c825ef","status":"affected","lessThan":"39708bc8da7858de0bed9b3a88b3beb1d1e0b443","versionType":"git"},{"version":"5544e90c81261e82e02bbf7c6015a4b9c8c825ef","status":"affected","lessThan":"560181d3ace61825f4ca9dd3481d6c0ee6709fa8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvmem/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.11","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvmem/core.c"]}],"references":["https://git.kernel.org/stable/c/23676ecd2eb377f7c24a6ff578b0f4c7135658b6","https://git.kernel.org/stable/c/8f9c4b2a3b132bf6698e477aba6ee194b40c75f4","https://git.kernel.org/stable/c/39708bc8da7858de0bed9b3a88b3beb1d1e0b443","https://git.kernel.org/stable/c/560181d3ace61825f4ca9dd3481d6c0ee6709fa8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52929.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52929","state":"PUBLISHED","datePublished":"2025-03-27T16:37:11.396Z","dateUpdated":"2026-05-11T19:35:54.530Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-21T06:07:11.018Z"},"containers":{"cna":{"title":"nvmem: core: fix cleanup after dev_set_name()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmem: core: fix cleanup after dev_set_name()\n\nIf dev_set_name() fails, we leak nvmem->wp_gpio as the cleanup does not\nput this. While a minimal fix for this would be to add the gpiod_put()\ncall, we can do better if we split device_register(), and use the\ntested nvmem_release() cleanup code by initialising the device early,\nand putting the device.\n\nThis results in a slightly larger fix, but results in clear code.\n\nNote: this patch depends on \"nvmem: core: initialise nvmem->id early\"\nand \"nvmem: core: remove nvmem_config wp_gpio\".\n\n[Srini: Fixed subject line and error code handing with wp_gpio while applying.]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a19a0f67dbb89ad2bfc466f2003841acba645884","status":"affected","lessThan":"23676ecd2eb377f7c24a6ff578b0f4c7135658b6","versionType":"git"},{"version":"14eea6449473c1f55e196cc104ba16d144465869","status":"affected","lessThan":"8f9c4b2a3b132bf6698e477aba6ee194b40c75f4","versionType":"git"},{"version":"5544e90c81261e82e02bbf7c6015a4b9c8c825ef","status":"affected","lessThan":"39708bc8da7858de0bed9b3a88b3beb1d1e0b443","versionType":"git"},{"version":"5544e90c81261e82e02bbf7c6015a4b9c8c825ef","status":"affected","lessThan":"560181d3ace61825f4ca9dd3481d6c0ee6709fa8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvmem/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.11","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvmem/core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/23676ecd2eb377f7c24a6ff578b0f4c7135658b6"},{"url":"https://git.kernel.org/stable/c/8f9c4b2a3b132bf6698e477aba6ee194b40c75f4"},{"url":"https://git.kernel.org/stable/c/39708bc8da7858de0bed9b3a88b3beb1d1e0b443"},{"url":"https://git.kernel.org/stable/c/560181d3ace61825f4ca9dd3481d6c0ee6709fa8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:35:54.530Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}