{"api_version":"1","generated_at":"2026-07-23T10:07:25+00:00","cve":"CVE-2024-26596","urls":{"html":"https://cve.report/CVE-2024-26596","api":"https://cve.report/api/cve/CVE-2024-26596.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-26596","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-26596"},"summary":{"title":"net: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events\n\nAfter the blamed commit, we started doing this dereference for every\nNETDEV_CHANGEUPPER and NETDEV_PRECHANGEUPPER event in the system.\n\nstatic inline struct dsa_port *dsa_user_to_port(const struct net_device *dev)\n{\n\tstruct dsa_user_priv *p = netdev_priv(dev);\n\n\treturn p->dp;\n}\n\nWhich is obviously bogus, because not all net_devices have a netdev_priv()\nof type struct dsa_user_priv. But struct dsa_user_priv is fairly small,\nand p->dp means dereferencing 8 bytes starting with offset 16. Most\ndrivers allocate that much private memory anyway, making our access not\nfault, and we discard the bogus data quickly afterwards, so this wasn't\ncaught.\n\nBut the dummy interface is somewhat special in that it calls\nalloc_netdev() with a priv size of 0. So every netdev_priv() dereference\nis invalid, and we get this when we emit a NETDEV_PRECHANGEUPPER event\nwith a VLAN as its new upper:\n\n$ ip link add dummy1 type dummy\n$ ip link add link dummy1 name dummy1.100 type vlan id 100\n[   43.309174] ==================================================================\n[   43.316456] BUG: KASAN: slab-out-of-bounds in dsa_user_prechangeupper+0x30/0xe8\n[   43.323835] Read of size 8 at addr ffff3f86481d2990 by task ip/374\n[   43.330058]\n[   43.342436] Call trace:\n[   43.366542]  dsa_user_prechangeupper+0x30/0xe8\n[   43.371024]  dsa_user_netdevice_event+0xb38/0xee8\n[   43.375768]  notifier_call_chain+0xa4/0x210\n[   43.379985]  raw_notifier_call_chain+0x24/0x38\n[   43.384464]  __netdev_upper_dev_link+0x3ec/0x5d8\n[   43.389120]  netdev_upper_dev_link+0x70/0xa8\n[   43.393424]  register_vlan_dev+0x1bc/0x310\n[   43.397554]  vlan_newlink+0x210/0x248\n[   43.401247]  rtnl_newlink+0x9fc/0xe30\n[   43.404942]  rtnetlink_rcv_msg+0x378/0x580\n\nAvoid the kernel oops by dereferencing after the type check, as customary.","state":"PUBLISHED","assigner":"Linux","published_at":"2024-02-23 15:15:09","updated_at":"2026-05-12 12:16:18"},"problem_types":["NVD-CWE-noinfo"],"metrics":[{"version":"3.1","source":"nvd@nist.gov","type":"Primary","score":"5.5","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}}],"references":[{"url":"https://git.kernel.org/stable/c/844f104790bd69c2e4dbb9ee3eba46fde1fcea7b","name":"https://git.kernel.org/stable/c/844f104790bd69c2e4dbb9ee3eba46fde1fcea7b","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","name":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","refsource":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9e9953f5e4d6d11a9dad56fdee307bb923302809","name":"https://git.kernel.org/stable/c/9e9953f5e4d6d11a9dad56fdee307bb923302809","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/69a1e2d938dbbfcff0e064269adf60ad26dbb102","name":"https://git.kernel.org/stable/c/69a1e2d938dbbfcff0e064269adf60ad26dbb102","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/dbd909c20c11f0d29c0054d41e0d1f668a60e8c8","name":"https://git.kernel.org/stable/c/dbd909c20c11f0d29c0054d41e0d1f668a60e8c8","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","name":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-26596","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26596","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 9e9953f5e4d6d11a9dad56fdee307bb923302809 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 69a1e2d938dbbfcff0e064269adf60ad26dbb102 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 dbd909c20c11f0d29c0054d41e0d1f668a60e8c8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 844f104790bd69c2e4dbb9ee3eba46fde1fcea7b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.129 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.55 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.7.2 6.7.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.8 * original_commit_for_fix","platforms":[]},{"source":"ADP","vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","version":"affected V3.1.5 * custom","platforms":[]},{"source":"ADP","vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","version":"affected V3.1.5 * custom","platforms":[]},{"source":"ADP","vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","version":"affected V3.1.5 * custom","platforms":[]},{"source":"ADP","vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","version":"affected V3.1.5 * custom","platforms":[]},{"source":"ADP","vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","version":"affected V3.1.5 * custom","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2024","cve_id":"26596","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2024","cve_id":"26596","cve":"CVE-2024-26596","epss":"0.000130000","percentile":"0.019560000","score_date":"2026-05-12","updated_at":"2026-05-13 00:11:53"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2024-26596","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2024-06-28T17:04:32.232033Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2024-06-28T17:04:40.027Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"},{"providerMetadata":{"dateUpdated":"2025-11-03T19:29:25.649Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"tags":["x_transferred"],"url":"https://git.kernel.org/stable/c/dbd909c20c11f0d29c0054d41e0d1f668a60e8c8"},{"tags":["x_transferred"],"url":"https://git.kernel.org/stable/c/844f104790bd69c2e4dbb9ee3eba46fde1fcea7b"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"title":"CVE Program Container"},{"affected":[{"defaultStatus":"unknown","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","vendor":"Siemens","versions":[{"lessThan":"*","status":"affected","version":"V3.1.5","versionType":"custom"}]},{"defaultStatus":"unknown","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","vendor":"Siemens","versions":[{"lessThan":"*","status":"affected","version":"V3.1.5","versionType":"custom"}]},{"defaultStatus":"unknown","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","vendor":"Siemens","versions":[{"lessThan":"*","status":"affected","version":"V3.1.5","versionType":"custom"}]},{"defaultStatus":"unknown","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","vendor":"Siemens","versions":[{"lessThan":"*","status":"affected","version":"V3.1.5","versionType":"custom"}]},{"defaultStatus":"unknown","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","vendor":"Siemens","versions":[{"lessThan":"*","status":"affected","version":"V3.1.5","versionType":"custom"}]}],"providerMetadata":{"dateUpdated":"2026-05-12T11:49:19.508Z","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","shortName":"siemens-SADP"},"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"}],"x_adpType":"supplier"}],"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/dsa/user.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"9e9953f5e4d6d11a9dad56fdee307bb923302809","status":"affected","version":"4c3f80d22b2eca911143ce656fa45c4699ff5bf4","versionType":"git"},{"lessThan":"69a1e2d938dbbfcff0e064269adf60ad26dbb102","status":"affected","version":"4c3f80d22b2eca911143ce656fa45c4699ff5bf4","versionType":"git"},{"lessThan":"dbd909c20c11f0d29c0054d41e0d1f668a60e8c8","status":"affected","version":"4c3f80d22b2eca911143ce656fa45c4699ff5bf4","versionType":"git"},{"lessThan":"844f104790bd69c2e4dbb9ee3eba46fde1fcea7b","status":"affected","version":"4c3f80d22b2eca911143ce656fa45c4699ff5bf4","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/dsa/user.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.1"},{"lessThan":"6.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.129","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.55","versionType":"semver"},{"lessThanOrEqual":"6.7.*","status":"unaffected","version":"6.7.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.8","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.129","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.55","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.7.2","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.8","versionStartIncluding":"6.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events\n\nAfter the blamed commit, we started doing this dereference for every\nNETDEV_CHANGEUPPER and NETDEV_PRECHANGEUPPER event in the system.\n\nstatic inline struct dsa_port *dsa_user_to_port(const struct net_device *dev)\n{\n\tstruct dsa_user_priv *p = netdev_priv(dev);\n\n\treturn p->dp;\n}\n\nWhich is obviously bogus, because not all net_devices have a netdev_priv()\nof type struct dsa_user_priv. But struct dsa_user_priv is fairly small,\nand p->dp means dereferencing 8 bytes starting with offset 16. Most\ndrivers allocate that much private memory anyway, making our access not\nfault, and we discard the bogus data quickly afterwards, so this wasn't\ncaught.\n\nBut the dummy interface is somewhat special in that it calls\nalloc_netdev() with a priv size of 0. So every netdev_priv() dereference\nis invalid, and we get this when we emit a NETDEV_PRECHANGEUPPER event\nwith a VLAN as its new upper:\n\n$ ip link add dummy1 type dummy\n$ ip link add link dummy1 name dummy1.100 type vlan id 100\n[   43.309174] ==================================================================\n[   43.316456] BUG: KASAN: slab-out-of-bounds in dsa_user_prechangeupper+0x30/0xe8\n[   43.323835] Read of size 8 at addr ffff3f86481d2990 by task ip/374\n[   43.330058]\n[   43.342436] Call trace:\n[   43.366542]  dsa_user_prechangeupper+0x30/0xe8\n[   43.371024]  dsa_user_netdevice_event+0xb38/0xee8\n[   43.375768]  notifier_call_chain+0xa4/0x210\n[   43.379985]  raw_notifier_call_chain+0x24/0x38\n[   43.384464]  __netdev_upper_dev_link+0x3ec/0x5d8\n[   43.389120]  netdev_upper_dev_link+0x70/0xa8\n[   43.393424]  register_vlan_dev+0x1bc/0x310\n[   43.397554]  vlan_newlink+0x210/0x248\n[   43.401247]  rtnl_newlink+0x9fc/0xe30\n[   43.404942]  rtnetlink_rcv_msg+0x378/0x580\n\nAvoid the kernel oops by dereferencing after the type check, as customary."}],"providerMetadata":{"dateUpdated":"2026-05-11T20:00:27.975Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/9e9953f5e4d6d11a9dad56fdee307bb923302809"},{"url":"https://git.kernel.org/stable/c/69a1e2d938dbbfcff0e064269adf60ad26dbb102"},{"url":"https://git.kernel.org/stable/c/dbd909c20c11f0d29c0054d41e0d1f668a60e8c8"},{"url":"https://git.kernel.org/stable/c/844f104790bd69c2e4dbb9ee3eba46fde1fcea7b"}],"title":"net: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2024-26596","datePublished":"2024-02-23T14:46:25.420Z","dateReserved":"2024-02-19T14:20:24.127Z","dateUpdated":"2026-05-12T11:49:19.508Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2024-02-23 15:15:09","lastModifiedDate":"2026-05-12 12:16:18","problem_types":["NVD-CWE-noinfo"],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.0","versionEndExcluding":"6.7.2","matchCriteriaId":"9D0FCB67-1966-41C4-BCD4-66C3CA68D4B5"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2024","CveId":"26596","Ordinal":"1","Title":"net: dsa: fix netdev_priv() dereference before check on non-DSA ","CVE":"CVE-2024-26596","Year":"2024"},"notes":[{"CveYear":"2024","CveId":"26596","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events\n\nAfter the blamed commit, we started doing this dereference for every\nNETDEV_CHANGEUPPER and NETDEV_PRECHANGEUPPER event in the system.\n\nstatic inline struct dsa_port *dsa_user_to_port(const struct net_device *dev)\n{\n\tstruct dsa_user_priv *p = netdev_priv(dev);\n\n\treturn p->dp;\n}\n\nWhich is obviously bogus, because not all net_devices have a netdev_priv()\nof type struct dsa_user_priv. But struct dsa_user_priv is fairly small,\nand p->dp means dereferencing 8 bytes starting with offset 16. Most\ndrivers allocate that much private memory anyway, making our access not\nfault, and we discard the bogus data quickly afterwards, so this wasn't\ncaught.\n\nBut the dummy interface is somewhat special in that it calls\nalloc_netdev() with a priv size of 0. So every netdev_priv() dereference\nis invalid, and we get this when we emit a NETDEV_PRECHANGEUPPER event\nwith a VLAN as its new upper:\n\n$ ip link add dummy1 type dummy\n$ ip link add link dummy1 name dummy1.100 type vlan id 100\n[   43.309174] ==================================================================\n[   43.316456] BUG: KASAN: slab-out-of-bounds in dsa_user_prechangeupper+0x30/0xe8\n[   43.323835] Read of size 8 at addr ffff3f86481d2990 by task ip/374\n[   43.330058]\n[   43.342436] Call trace:\n[   43.366542]  dsa_user_prechangeupper+0x30/0xe8\n[   43.371024]  dsa_user_netdevice_event+0xb38/0xee8\n[   43.375768]  notifier_call_chain+0xa4/0x210\n[   43.379985]  raw_notifier_call_chain+0x24/0x38\n[   43.384464]  __netdev_upper_dev_link+0x3ec/0x5d8\n[   43.389120]  netdev_upper_dev_link+0x70/0xa8\n[   43.393424]  register_vlan_dev+0x1bc/0x310\n[   43.397554]  vlan_newlink+0x210/0x248\n[   43.401247]  rtnl_newlink+0x9fc/0xe30\n[   43.404942]  rtnetlink_rcv_msg+0x378/0x580\n\nAvoid the kernel oops by dereferencing after the type check, as customary.","Type":"Description","Title":"net: dsa: fix netdev_priv() dereference before check on non-DSA "}]}}}