{"id":"CVE-2025-38342","state":"PUBLISHED","title":"software node: Correct a OOB check in software_node_get_reference_args()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsoftware node: Correct a OOB check in software_node_get_reference_args()\n\nsoftware_node_get_reference_args() wants to get @index-th element, so\nthe property value requires at least '(index + 1) * sizeof(*ref)' bytes\nbut that can not be guaranteed by current OOB check, and may cause OOB\nfor malformed property.\n\nFix by using as OOB check '((index + 1) * sizeof(*ref) > prop->length)'.","publishedAt":"2025-07-10T08:15:11.561Z","updatedAt":"2026-10-15T21:52:14.411Z","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":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"142acd739eb6f08c148a96ae8309256f1422ff4b","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"56ce76e8d406cc72b89aee7931df5cf3f18db49d","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"9324127b07dde8529222dc19233aa57ec810856c","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"f9397cf7bfb680799fb8c7f717c8f756384c3280","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"4b3383110b6df48e0ba5936af2cb68d5eb6bd43b","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"7af18e42bdefe1dba5bcb32555a4d524fd504939","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"31e4e12e0e9609850cefd4b2e1adf782f56337d6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/swnode.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.10.239","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.186","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.142","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.95","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.35","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.4","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/swnode.c"]}],"references":["https://git.kernel.org/stable/c/142acd739eb6f08c148a96ae8309256f1422ff4b","https://git.kernel.org/stable/c/56ce76e8d406cc72b89aee7931df5cf3f18db49d","https://git.kernel.org/stable/c/9324127b07dde8529222dc19233aa57ec810856c","https://git.kernel.org/stable/c/f9397cf7bfb680799fb8c7f717c8f756384c3280","https://git.kernel.org/stable/c/4b3383110b6df48e0ba5936af2cb68d5eb6bd43b","https://git.kernel.org/stable/c/7af18e42bdefe1dba5bcb32555a4d524fd504939","https://git.kernel.org/stable/c/31e4e12e0e9609850cefd4b2e1adf782f56337d6","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","https://cert-portal.siemens.com/productcert/html/ssa-082556.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38342.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38342","state":"PUBLISHED","datePublished":"2025-07-10T08:15:11.561Z","dateUpdated":"2026-10-15T21:52:14.411Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.005Z"},"containers":{"cna":{"title":"software node: Correct a OOB check in software_node_get_reference_args()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsoftware node: Correct a OOB check in software_node_get_reference_args()\n\nsoftware_node_get_reference_args() wants to get @index-th element, so\nthe property value requires at least '(index + 1) * sizeof(*ref)' bytes\nbut that can not be guaranteed by current OOB check, and may cause OOB\nfor malformed property.\n\nFix by using as OOB check '((index + 1) * sizeof(*ref) > prop->length)'."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"142acd739eb6f08c148a96ae8309256f1422ff4b","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"56ce76e8d406cc72b89aee7931df5cf3f18db49d","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"9324127b07dde8529222dc19233aa57ec810856c","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"f9397cf7bfb680799fb8c7f717c8f756384c3280","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"4b3383110b6df48e0ba5936af2cb68d5eb6bd43b","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"7af18e42bdefe1dba5bcb32555a4d524fd504939","versionType":"git"},{"version":"59abd83672f70cac4b6bf9b237506c5bc6837606","status":"affected","lessThan":"31e4e12e0e9609850cefd4b2e1adf782f56337d6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/swnode.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.10.239","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.186","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.142","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.95","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.35","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.4","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/base/swnode.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/142acd739eb6f08c148a96ae8309256f1422ff4b"},{"url":"https://git.kernel.org/stable/c/56ce76e8d406cc72b89aee7931df5cf3f18db49d"},{"url":"https://git.kernel.org/stable/c/9324127b07dde8529222dc19233aa57ec810856c"},{"url":"https://git.kernel.org/stable/c/f9397cf7bfb680799fb8c7f717c8f756384c3280"},{"url":"https://git.kernel.org/stable/c/4b3383110b6df48e0ba5936af2cb68d5eb6bd43b"},{"url":"https://git.kernel.org/stable/c/7af18e42bdefe1dba5bcb32555a4d524fd504939"},{"url":"https://git.kernel.org/stable/c/31e4e12e0e9609850cefd4b2e1adf782f56337d6"}],"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 affected code is driver-core firmware-node plumbing reached only during in-kernel device/driver probe and property lookups on the local machine (gpiolib-swnode, iio/inkern, sfp-bus, reset, mailbox, v4l2-fwnode); no packet, socket or remote peer data ever reaches `software_node_get_reference_args()`.\nAC:H - The faulty bound only differs from the correct one when `prop->length` is not an exact multiple of `sizeof(struct software_node_ref_args)`, and every in-tree `DEV_PROP_REF` property is built by `PROPERTY_ENTRY_REF[_ARRAY[_LEN]]()`, which always sets an exact multiple; the required malformed property table is a condition the attacker cannot create or influence.\nPR:L - If a mis-sized reference property existed, the lookup is driven from ordinary probe/consumer paths that an unprivileged local user can provoke (device binding, opening a consumer device node) without any capability; scored as low privilege rather than high since no root-only interface gates it.\nUI:N - The out-of-bounds element read happens automatically inside the property lookup during device probe or consumer resource acquisition, with no action required from another user.\nS:U - The overread, wild pointer dereference and any resulting crash are confined to the kernel's own security authority on the same host; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Up to 87 bytes of adjacent slab memory beyond the reference array are read and interpreted as a `software_node_ref_args`, and the eight `u64 args[]` values from that out-of-bounds memory are propagated to consumers (GPIO/IIO/reset specifiers) where they can surface, making this more than a strictly bounded few-byte read.\nI:H - The out-of-bounds bytes are type-confused into a live `struct fwnode_handle *` that is dereferenced and invoked through its ops vtable (`fwnode_property_read_u32()`, `fwnode_handle_get()` → `kobject_get()`), giving an indirect call through non-object memory and a refcount increment at an out-of-bounds address — a control-flow-relevant corruption primitive.\nA:H - Reading past the allocation yields a garbage `fwnode` pointer that is immediately dereferenced and called through, producing a kernel oops/panic (and a KASAN slab-out-of-bounds report on instrumented kernels)."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:01:14.909Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.10.239"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.15.186"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.1.142"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.6.95"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.12.35"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.15.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:36:49.489Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:07:06.978Z"},"x_adpType":"supplier"},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-38342","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:49:40.301712Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:52:14.411Z"}}]}}}