CVE-2025-71079

Source
https://cve.org/CVERecord?id=CVE-2025-71079
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-71079.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-71079
Downstream
Related
Published
2026-01-13T15:34:44.136Z
Modified
2026-03-20T12:46:35.364590Z
Summary
net: nfc: fix deadlock between nfc_unregister_device and rfkill_fop_write
Details

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

net: nfc: fix deadlock between nfcunregisterdevice and rfkillfopwrite

A deadlock can occur between nfcunregisterdevice() and rfkillfopwrite() due to lock ordering inversion between devicelock and rfkillglobal_mutex.

The problematic lock order is:

Thread A (rfkillfopwrite): rfkillfopwrite() mutexlock(&rfkillglobalmutex) rfkillsetblock() nfcrfkillsetblock() nfcdevdown() devicelock(&dev->dev) <- waits for devicelock

Thread B (nfcunregisterdevice): nfcunregisterdevice() devicelock(&dev->dev) rfkillunregister() mutexlock(&rfkillglobalmutex) <- waits for rfkillglobal_mutex

This creates a classic ABBA deadlock scenario.

Fix this by moving rfkillunregister() and rfkilldestroy() outside the devicelock critical section. Store the rfkill pointer in a local variable before releasing the lock, then call rfkillunregister() after releasing device_lock.

This change is safe because rfkillfopwrite() holds rfkillglobalmutex while calling the rfkill callbacks, and rfkillunregister() also acquires rfkillglobalmutex before cleanup. Therefore, rfkillunregister() will wait for any ongoing callback to complete before proceeding, and devicedel() is only called after rfkillunregister() returns, preventing any use-after-free.

The similar lock ordering in nfcregisterdevice() (devicelock -> rfkillglobalmutex via rfkillregister) is safe because during registration the device is not yet in rfkill_list, so no concurrent rfkill operations can occur on this device.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71079.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
73a0d12114b4bc1a9def79a623264754b9df698e
Fixed
2e0831e9fc46a06daa6d4d8d57a2738e343130c3
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8a9c61c3ef187d8891225f9b932390670a43a0d3
Fixed
e02a1c33f10a0ed3aba855ab8ae2b6c4c5be8012
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3e3b5dfcd16a3e254aab61bd1e8c417dd4503102
Fixed
ee41f4f3ccf8cd6ba3732e867abbec7e6d8d12e5
Fixed
6b93c8ab6f6cda8818983a4ae3fcf84b023037b4
Fixed
8fc4632fb508432895430cd02b38086bdd649083
Fixed
f3a8a7c1aa278f2378b2f3a10500c6674dffdfda
Fixed
1ab526d97a57e44d26fadcc0e9adeb9c0c0182f5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
5ef16d2d172ee56714cff37cd005b98aba08ef5a
Last affected
ff169909eac9e00bf1aa0af739ba6ddfb1b1d135
Last affected
47244ac0b65bd74cc70007d8e1bac68bd2baad19
Last affected
c45cea83e13699bdfd47842e04d09dd43af4c371
Last affected
307d2e6cebfca9d92f86c8e2c8e3dd4a8be46ba6

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-71079.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.248
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.198
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.160
Fixed
6.6.120
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.12.64
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.18.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-71079.json"