{"id":"CVE-2024-26734","state":"PUBLISHED","title":"devlink: fix possible use-after-free and memory leaks in devlink_init()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndevlink: fix possible use-after-free and memory leaks in devlink_init()\n\nThe pernet operations structure for the subsystem must be registered\nbefore registering the generic netlink family.\n\nMake an unregister in case of unsuccessful registration.","publishedAt":"2024-04-03T17:00:21.162Z","updatedAt":"2026-08-05T11:26:53.941Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"687125b5799cd5120437fa455cfccbe8537916ff","status":"affected","lessThan":"919092bd5482b7070ae66d1daef73b600738f3a2","versionType":"git"},{"version":"687125b5799cd5120437fa455cfccbe8537916ff","status":"affected","lessThan":"e91d3561e28d7665f4f837880501dc8755f635a9","versionType":"git"},{"version":"687125b5799cd5120437fa455cfccbe8537916ff","status":"affected","lessThan":"def689fc26b9a9622d2e2cb0c4933dd3b1c8071c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.19","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.7","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]}],"references":["https://git.kernel.org/stable/c/919092bd5482b7070ae66d1daef73b600738f3a2","https://git.kernel.org/stable/c/e91d3561e28d7665f4f837880501dc8755f635a9","https://git.kernel.org/stable/c/def689fc26b9a9622d2e2cb0c4933dd3b1c8071c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26734.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26734","state":"PUBLISHED","datePublished":"2024-04-03T17:00:21.162Z","dateUpdated":"2026-08-05T11:26:53.941Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.165Z"},"containers":{"cna":{"title":"devlink: fix possible use-after-free and memory leaks in devlink_init()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndevlink: fix possible use-after-free and memory leaks in devlink_init()\n\nThe pernet operations structure for the subsystem must be registered\nbefore registering the generic netlink family.\n\nMake an unregister in case of unsuccessful registration."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"687125b5799cd5120437fa455cfccbe8537916ff","status":"affected","lessThan":"919092bd5482b7070ae66d1daef73b600738f3a2","versionType":"git"},{"version":"687125b5799cd5120437fa455cfccbe8537916ff","status":"affected","lessThan":"e91d3561e28d7665f4f837880501dc8755f635a9","versionType":"git"},{"version":"687125b5799cd5120437fa455cfccbe8537916ff","status":"affected","lessThan":"def689fc26b9a9622d2e2cb0c4933dd3b1c8071c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.19","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.7","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/devlink/core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/919092bd5482b7070ae66d1daef73b600738f3a2"},{"url":"https://git.kernel.org/stable/c/e91d3561e28d7665f4f837880501dc8755f635a9"},{"url":"https://git.kernel.org/stable/c/def689fc26b9a9622d2e2cb0c4933dd3b1c8071c"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The resulting dangling `struct net` pointer is only reached through the devlink generic-netlink family from a local AF_NETLINK socket (`devlinks_xa_find_get()` → `devlink_net()`), with no remote protocol involvement. Netlink-reachable kernel state is scored Local.\nAC:H - The vulnerable state only exists if a registration inside the boot-time `subsys_initcall` `devlink_init()` fails, which depends on early-boot allocation conditions entirely outside attacker influence — and in practice `register_pernet_subsys()` on `.pre_exit`-only ops and `register_netdevice_notifier()` on an always-`NOTIFY_OK` handler cannot fail at all.\nPR:L - Once the pernet `pre_exit` hook is missing, the stale `devlink->_net` is dereferenced from `DEVLINK_CMD_*_GET`/dump handlers that carry no `GENL_ADMIN_PERM`, so any unprivileged local user with a netlink socket can touch the freed pointer.\nUI:N - Triggering the devlink netlink query that dereferences the dangling namespace pointer requires no action by any other user or administrator.\nS:U - The corruption and its consequences stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - A use-after-free on a freed `struct net` lets an attacker reclaim the slab with controlled data and read back kernel memory through devlink's namespace-filtered dump paths.\nI:H - The same use-after-free permits heap spraying of the freed `struct net`, yielding attacker-influenced writes through the reference-counting and reload paths that operate on it, which is exploitable toward control-flow hijack.\nA:H - Dereferencing a freed network namespace reliably produces an oops or panic, and the unbalanced registrations additionally leak kernel memory."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:26:53.941Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.6.19"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.7.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/919092bd5482b7070ae66d1daef73b600738f3a2","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e91d3561e28d7665f4f837880501dc8755f635a9","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/def689fc26b9a9622d2e2cb0c4933dd3b1c8071c","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:14:13.249Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-26734","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:51:57.238703Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:19.585Z"}}]}}}