CVE-2026-90224: nfc: nci: fix double completion race in nci_data_exchange_complete

Published Sep 17, 2026
·
Updated

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

nfc: nci: fix double completion race in ncidataexchangecomplete

nciclosedevice() and ncirxwork can both call ncidataexchangecomplete() concurrently. After commit 4527025d440ce8 ("nfc: nci: fix circular locking dependency in nciclosedevice") moved flushworkqueue(ndev->rxwq) after mutexunlock(&ndev->reqlock), rxwork is no longer serialized with the explicit completion call in the close path. Both callers read the non-NULL callback pointer and invoke rawsockdataexchangecomplete(), which calls sockput() -- but only one sockhold() was taken, so the second sockput() underflows the refcount and frees the socket while it is still in use.

Replace the bare clearbit(NCIDATAEXCHANGE) with testandclearbit() so that only the first caller proceeds to invoke the callback.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel nfc: nci to a version that resolves this vulnerability.

    Patch 4527025d440ce8
  2. Compensating control

    Ensure close path serialization by flushing nd av rx workqueue after releasing req_lock: call flush_workqueue(ndev->rx_wq) after mutex_unlock(&ndev->req_lock) to prevent concurrent nci_close_device() and nci_rx_work calling nci_data_exchange_complete().

Event History

Sep 17, 2026
CVE Published
via MITRE·04:07 PM
Data Sourced
via MITRE·04:07 PM
Description

Frequently Asked Questions

1

When can the refcount underflow occur?

It requires nci_close_device() and nci_rx_work to call nci_data_exchange_complete() concurrently. Both paths can observe the callback pointer as non-NULL and invoke rawsock_data_exchange_complete() even though only one sock_hold() was taken.

2

What is the resulting failure mode?

The second sock_put() can underflow the socket reference count and free a socket that is still in use.

3

What change resolves the race?

The fix replaces the unconditional clear_bit(NCI_DATA_EXCHANGE) with test_and_clear_bit(). This ensures only the first completion path invokes the callback.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203