{"id":"CVE-2025-38341","state":"PUBLISHED","title":"eth: fbnic: avoid double free when failing to DMA-map FW msg","description":"In the Linux kernel, the following vulnerability has been resolved:\n\neth: fbnic: avoid double free when failing to DMA-map FW msg\n\nThe semantics are that caller of fbnic_mbx_map_msg() retains\nthe ownership of the message on error. All existing callers\ndutifully free the page.","publishedAt":"2025-07-10T08:15:10.928Z","updatedAt":"2026-08-05T12:01:13.843Z","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":"da3cde08209ec1c915195c2331c275397f34a731","status":"affected","lessThan":"670179265ad787b9dd8e701601914618b8927755","versionType":"git"},{"version":"da3cde08209ec1c915195c2331c275397f34a731","status":"affected","lessThan":"0a211e23852019ef55c70094524e87a944accbb5","versionType":"git"},{"version":"da3cde08209ec1c915195c2331c275397f34a731","status":"affected","lessThan":"5bd1bafd4474ee26f504b41aba11f3e2a1175b88","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/meta/fbnic/fbnic_fw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","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/net/ethernet/meta/fbnic/fbnic_fw.c"]}],"references":["https://git.kernel.org/stable/c/670179265ad787b9dd8e701601914618b8927755","https://git.kernel.org/stable/c/0a211e23852019ef55c70094524e87a944accbb5","https://git.kernel.org/stable/c/5bd1bafd4474ee26f504b41aba11f3e2a1175b88"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38341.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38341","state":"PUBLISHED","datePublished":"2025-07-10T08:15:10.928Z","dateUpdated":"2026-08-05T12:01:13.843Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.005Z"},"containers":{"cna":{"title":"eth: fbnic: avoid double free when failing to DMA-map FW msg","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\neth: fbnic: avoid double free when failing to DMA-map FW msg\n\nThe semantics are that caller of fbnic_mbx_map_msg() retains\nthe ownership of the message on error. All existing callers\ndutifully free the page."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"da3cde08209ec1c915195c2331c275397f34a731","status":"affected","lessThan":"670179265ad787b9dd8e701601914618b8927755","versionType":"git"},{"version":"da3cde08209ec1c915195c2331c275397f34a731","status":"affected","lessThan":"0a211e23852019ef55c70094524e87a944accbb5","versionType":"git"},{"version":"da3cde08209ec1c915195c2331c275397f34a731","status":"affected","lessThan":"5bd1bafd4474ee26f504b41aba11f3e2a1175b88","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/meta/fbnic/fbnic_fw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","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/net/ethernet/meta/fbnic/fbnic_fw.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/670179265ad787b9dd8e701601914618b8927755"},{"url":"https://git.kernel.org/stable/c/0a211e23852019ef55c70094524e87a944accbb5"},{"url":"https://git.kernel.org/stable/c/5bd1bafd4474ee26f504b41aba11f3e2a1175b88"}],"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 - All trigger paths are local — a world-readable hwmon sysfs read (`/sys/class/hwmon/hwmonN/temp1_input`, mode 0444), netdev open/close ownership messages, devlink flash, and the driver's own heartbeat/mailbox-refill timers. No remote peer data reaches this code path.\nAC:L - The vulnerable path can be invoked at will and repeatedly (each sensor read issues up to five mailbox messages), and the required `dma_map_single()` failure is reachable by driving IOVA/swiotlb pressure concurrently, so the attacker can influence both the trigger rate and the failure condition.\nPR:L - `fbnic_hwmon_is_visible()` exposes the sensor attributes as 0444, so any unprivileged local account can drive `fbnic_fw_xmit_tsene_read_msg()` into `fbnic_mbx_map_msg()`; the heartbeat and Rx-refill callers reach the same code with no user context at all.\nUI:N - No victim action is needed — the attacker reads a sysfs file directly, and the heartbeat/mailbox-refill paths execute autonomously.\nS:U - The double free corrupts the kernel's own page allocator state within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The `spin_unlock_irqrestore()` between the two `free_page()` calls opens a window for the page to be reallocated, so the second free hands an in-use page back to the allocator, allowing the attacker to obtain a page aliased with another allocation and read its contents.\nI:H - The same cross-allocation aliasing yields a write primitive over memory belonging to another owner (kernel structures or another task's pages), which is exploitable for control-flow hijacking or privilege escalation.\nA:H - With `CONFIG_DEBUG_VM` the second free hits `VM_BUG_ON_PAGE(page_ref_count(page) == 0)` for an immediate BUG/oops; otherwise the `_refcount` underflow and resulting use-after-free readily panic the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:01:13.843Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.35"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.15.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}