{"id":"CVE-2025-37789","state":"PUBLISHED","title":"net: openvswitch: fix nested key length validation in the set() action","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: openvswitch: fix nested key length validation in the set() action\n\nIt's not safe to access nla_len(ovs_key) if the data is smaller than\nthe netlink header.  Check that the attribute is OK first.","publishedAt":"2025-05-01T13:07:22.809Z","updatedAt":"2026-08-05T11:57:32.820Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/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":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"54c6957d1123a2032099b9eab51c314800f677ce","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"7fcaec0b2ab8fa5fbf0b45e5512364a168f445bd","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"a27526e6b48eee9e2d82efff502c4f272f1a91d4","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"1489c195c8eecd262aa6712761ba5288203e28ec","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"824a7c2df5127b2402b68a21a265d413e78dcad7","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"be80768d4f3b6fd13f421451cc3fee8778aba8bc","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"03d7262dd53e8c404da35cc81aaa887fd901f76b","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"65d91192aa66f05710cfddf6a14b5a25ee554dba","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/openvswitch/flow_netlink.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.3","versionType":"semver"},{"version":"5.4.293","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.237","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.181","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.135","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.88","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.25","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.4","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/openvswitch/flow_netlink.c"]}],"references":["https://git.kernel.org/stable/c/54c6957d1123a2032099b9eab51c314800f677ce","https://git.kernel.org/stable/c/7fcaec0b2ab8fa5fbf0b45e5512364a168f445bd","https://git.kernel.org/stable/c/a27526e6b48eee9e2d82efff502c4f272f1a91d4","https://git.kernel.org/stable/c/1489c195c8eecd262aa6712761ba5288203e28ec","https://git.kernel.org/stable/c/824a7c2df5127b2402b68a21a265d413e78dcad7","https://git.kernel.org/stable/c/be80768d4f3b6fd13f421451cc3fee8778aba8bc","https://git.kernel.org/stable/c/03d7262dd53e8c404da35cc81aaa887fd901f76b","https://git.kernel.org/stable/c/65d91192aa66f05710cfddf6a14b5a25ee554dba","https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37789.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37789","state":"PUBLISHED","datePublished":"2025-05-01T13:07:22.809Z","dateUpdated":"2026-08-05T11:57:32.820Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.940Z"},"containers":{"cna":{"title":"net: openvswitch: fix nested key length validation in the set() action","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: openvswitch: fix nested key length validation in the set() action\n\nIt's not safe to access nla_len(ovs_key) if the data is smaller than\nthe netlink header.  Check that the attribute is OK first."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"54c6957d1123a2032099b9eab51c314800f677ce","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"7fcaec0b2ab8fa5fbf0b45e5512364a168f445bd","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"a27526e6b48eee9e2d82efff502c4f272f1a91d4","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"1489c195c8eecd262aa6712761ba5288203e28ec","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"824a7c2df5127b2402b68a21a265d413e78dcad7","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"be80768d4f3b6fd13f421451cc3fee8778aba8bc","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"03d7262dd53e8c404da35cc81aaa887fd901f76b","versionType":"git"},{"version":"ccb1352e76cff0524e7ccb2074826a092dd13016","status":"affected","lessThan":"65d91192aa66f05710cfddf6a14b5a25ee554dba","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/openvswitch/flow_netlink.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.3","versionType":"semver"},{"version":"5.4.293","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.237","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.181","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.135","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.88","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.25","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.4","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/openvswitch/flow_netlink.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/54c6957d1123a2032099b9eab51c314800f677ce"},{"url":"https://git.kernel.org/stable/c/7fcaec0b2ab8fa5fbf0b45e5512364a168f445bd"},{"url":"https://git.kernel.org/stable/c/a27526e6b48eee9e2d82efff502c4f272f1a91d4"},{"url":"https://git.kernel.org/stable/c/1489c195c8eecd262aa6712761ba5288203e28ec"},{"url":"https://git.kernel.org/stable/c/824a7c2df5127b2402b68a21a265d413e78dcad7"},{"url":"https://git.kernel.org/stable/c/be80768d4f3b6fd13f421451cc3fee8778aba8bc"},{"url":"https://git.kernel.org/stable/c/03d7262dd53e8c404da35cc81aaa887fd901f76b"},{"url":"https://git.kernel.org/stable/c/65d91192aa66f05710cfddf6a14b5a25ee554dba"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached only through a crafted generic-netlink message (OVS_FLOW_CMD_NEW / OVS_PACKET_CMD_EXECUTE) sent on an AF_NETLINK socket by a local process. There is no remote or adjacent-network path into openvswitch flow-action validation.\nAC:L - Triggering requires only a single well-formed netlink message containing an OVS_ACTION_ATTR_SET whose inner nlattr declares nla_len of 1-3; there is no race, no timing window, and no dependence on memory layout the attacker cannot influence. The negative-length path is fully in-bounds and deterministic, and the actions are validated before the datapath lookup so not even a datapath must exist.\nPR:L - The OVS flow genl ops use GENL_UNS_ADMIN_PERM with .netnsok = true, so the CAP_NET_ADMIN check is scoped to the netns's owning user namespace and any unprivileged user can satisfy it with `unshare -Urn`. The openvswitch module is autoloaded from an unprivileged CTRL_CMD_GETFAMILY lookup via MODULE_ALIAS_GENL_FAMILY.\nUI:N - The attacker performs the entire sequence themselves via socket()/sendmsg(); no action by any other user or administrator is needed.\nS:U - The corruption is confined to kernel memory under the same security authority as the attacking process; no VM, IOMMU, or hypervisor boundary is crossed.\nC:H - The bug produces out-of-bounds reads beyond the netlink skb — the KMSAN-confirmed header read, the unbounded forward scan in validate_masked() with a negative length, and a memcpy whose source is read for up to SIZE_MAX bytes. Data copied out of bounds lands in the flow's actions buffer, which is echoed back to userspace by OVS_FLOW_CMD_GET/DUMP, giving an arbitrary kernel-memory disclosure primitive.\nI:H - With key_len underflowing to (size_t)-1, `memcpy(nla_data(at), nla_data(ovs_key), key_len)` and the following `memset(..., 0xff, key_len)` perform an effectively unbounded out-of-bounds write over the kernel heap using attacker-influenced data. An out-of-bounds write of this scope is a full integrity compromise.\nA:H - The wild memcpy/memset will fault as soon as it walks off mapped memory, and the negative-length validate_masked() loop scans up to 4G of memory; either way the result is a kernel panic, and on sanitizer builds it is an immediate KASAN/KMSAN report. The crash is reachable repeatedly by an unprivileged local user."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:57:32.820Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.4.293"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.10.237"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.15.181"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.1.135"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.6.88"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.12.25"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.14.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:55:14.808Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-37789","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-06-10T20:41:41.618677Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-11T18:44:15.185Z"}}]}}}