CVE-2026-139460

Not scored yetLast modified Nov 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

PCI/P2PDMA: Do not tear down the allocate attribute on registration failure

pci_p2pdma_add_resource() installs pci_p2pdma_unmap_mappings() as a devres action with the devres allocated p2p_pgmap as its data, and only then adds the range to the pool:

error = devm_add_action_or_reset(&pdev->dev, pci_p2pdma_unmap_mappings, p2p_pgmap); if (error) goto pages_free;

p2pdma = rcu_dereference_protected(pdev->p2pdma, 1); error = gen_pool_add_owner(p2pdma->pool, ...); if (error) goto pages_free;

The action removes the allocate attribute for the whole device, which tears down existing userspace mappings of every BAR already registered on it. Both failures here get that wrong, in opposite ways.

devm_add_action_or_reset() runs the action when it cannot allocate its devres node, so an -ENOMEM while registering a second BAR unmaps the first one. Use devm_add_action() and let the error path unwind only what this call created.

gen_pool_add_owner() allocates a chunk and can also fail with -ENOMEM. There the action is registered, and the error path frees p2p_pgmap with devm_kfree() while leaving the action pointing at it. On unbind devres runs the action and pci_p2pdma_unmap_mappings() dereferences p2p_pgmap->mem->owner->kobj, which is freed memory. Give that failure its own label and drop the action with devm_remove_action(), which removes it without running it.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139461In the Linux kernel, the following vulnerability has been resolved: dma-direct: Restore arch_dma_alloc() for the DMA_ATTR_NO_KERNEL_MAPPINGCVE-2026-139462In the Linux kernel, the following vulnerability has been resolved: wifi: cfg80211: reg: protect regdb pointer with RCU reg_query_regdb_wmCVE-2026-139463In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: fix mbssid/rnr allocation in beacon data These structsCVE-2026-139464In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: limit injected HT/VHT MCSes With radiotap injection thCVE-2026-139465In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: kill wake_txqs_tasklet on unregistration We never killCVE-2026-139466In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: mesh: use hlist_add_head_rcu() The mesh paths walk lisCVE-2026-139467In the Linux kernel, the following vulnerability has been resolved: wifi: ath6kl: don't take RTNL in del_virtual_intf cfg80211 already holCVE-2026-139468In the Linux kernel, the following vulnerability has been resolved: ASoC: fsl_asrc_m2m: Fix bogus compress task pointer assignments When aCVE-2026-139469In the Linux kernel, the following vulnerability has been resolved: ALSA: line6: Fix potential OOB write in line6_capture_copy() line6_capCVE-2026-139475.3Uninitialized Use in XR in Google Chrome prior to 150.0.7871.47 allowed a remote attacker who had compromised the renderer process to obtainCVE-2026-139470In the Linux kernel, the following vulnerability has been resolved: ALSA: line6: Reject too small max packet sizes Although the LINE6 drivCVE-2026-139471In the Linux kernel, the following vulnerability has been resolved: ALSA: caiaq: Fix races at MIDI URB and trigger accesses URB completion
CVE-2026-139460: Unscored | Vulnix