nfc: nci: fix double completion race in nci_data_exchange_complete (Linux Linux)

CVE-2026-90224
HIGH 7.5

At a glance

Source
NVD
EPSS
EPSS 0.36 % · percentile 29 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Received

Description

In the Linux kernel, the following vulnerability has been resolved: nfc: nci: fix double completion race in nci_data_exchange_complete nci_close_device() and nci_rx_work can both call nci_data_exchange_complete() concurrently. After commit 4527025d440ce8 ("nfc: nci: fix circular locking dependency in nci_close_device") moved flush_workqueue(ndev->rx_wq) after mutex_unlock(&ndev->req_lock), rx_work is no longer serialized with the explicit completion call in the close path. Both callers read the non-NULL callback pointer and invoke rawsock_data_exchange_complete(), which calls sock_put() -- but only one sock_hold() was taken, so the second sock_put() underflows the refcount and frees the socket while it is still in use. Replace the bare clear_bit(NCI_DATA_EXCHANGE) with test_and_clear_bit() so that only the first caller proceeds to invoke the callback.

References

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 7.5CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HLinux
CVSS 3.1HIGH 7.5CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HNVD · 416baaa9-dc9f-4396-8d5f-8c081fb06d67 (Secondary)

European references

CERT-FR advisories

Affected products

ProductVersions
Linux · Linuxaffected 7ed00a3edc8597fe2333f524401e2889aa1b5edf < 3f075832734005310740d148d1cf1c1e792ebdca ; affected 5eef9ebec7f5738f12cadede3545c05b34bf5ac3 < 588ccd19a6e69eca72d54608c3ab3b45709b2305 ; affected ca54e904a071aa65ef3ad46ba42d51aaac6b73b4 < cf646a9f5554bc07d6ccb59c327812b3a0c6a368 ; affected eb435d150ca74b4d40f77f1a2266f3636ed64a79 < 9030a1bbe2c6b1e3e54cef462d159b5248f09fd2 ; affected 1edc12d2bbcb7a8d0f1088e6fccb9d8c01bb1289 < bfdf412208fea7fc0d5b32d68a35b25261917393 ; affected d89b74bf08f067b55c03d7f999ba0a0e73177eb3 < ba4c776af3dc21ed04e315e6545e99703bb1b53a
Linux · Linuxaffected 7.0 ; unaffected 0 < 7.0 ; unaffected 5.10.270 ≤ 5.10.* ; unaffected 5.15.221 ≤ 5.15.* ; unaffected 6.1.188 ≤ 6.1.* ; unaffected 6.6.157 ≤ 6.6.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD