CVE-2026-90224 PUBLISHED

nfc: nci: fix double completion race in nci_data_exchange_complete

Assigner: Linux
Reserved: 11.09.2026 Published: 17.09.2026 Updated: 17.09.2026

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 7ed00a3edc8597fe2333f524401e2889aa1b5edf to 3f075832734005310740d148d1cf1c1e792ebdca (excl.)
  • affected from 5eef9ebec7f5738f12cadede3545c05b34bf5ac3 to 588ccd19a6e69eca72d54608c3ab3b45709b2305 (excl.)
  • affected from ca54e904a071aa65ef3ad46ba42d51aaac6b73b4 to cf646a9f5554bc07d6ccb59c327812b3a0c6a368 (excl.)
  • affected from eb435d150ca74b4d40f77f1a2266f3636ed64a79 to 9030a1bbe2c6b1e3e54cef462d159b5248f09fd2 (excl.)
  • affected from 1edc12d2bbcb7a8d0f1088e6fccb9d8c01bb1289 to bfdf412208fea7fc0d5b32d68a35b25261917393 (excl.)
  • affected from d89b74bf08f067b55c03d7f999ba0a0e73177eb3 to ba4c776af3dc21ed04e315e6545e99703bb1b53a (excl.)
  • affected from 4527025d440ce84bf56e75ce1df2e84cb8178616 to ee08414d78b851e3d1856d6e4d631939b01a1bbe (excl.)
  • affected from 4527025d440ce84bf56e75ce1df2e84cb8178616 to 8265a626cc14a48e46e6dc8c47667e72b4232ac2 (excl.)
  • Version 09143c0e8f3b03517e6233aad42f45c794d8df8e is affected
  • affected from 5.10.253 to 5.10.270 (excl.)
  • affected from 5.15.203 to 5.15.221 (excl.)
  • affected from 6.1.168 to 6.1.188 (excl.)
  • affected from 6.6.131 to 6.6.157 (excl.)
  • affected from 6.12.80 to 6.12.110 (excl.)
  • affected from 6.18.21 to 6.18.52 (excl.)
  • affected from 6.19.11 to 6.20 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 7.0 is affected
  • unaffected from 0 to 7.0 (excl.)
  • unaffected from 5.10.270 to 5.10.* (incl.)
  • unaffected from 5.15.221 to 5.15.* (incl.)
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.52 to 6.18.* (incl.)
  • unaffected from 7.2.6 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References