NFC: NULL out the dev->rfkill to prevent UAF
In the Linux kernel, the following vulnerability has been resolved: NFC: NULL out the dev->rfkill to prevent UAF Commit 3e3b5dfcd16a ("NFC: reorder the logic in nfc_{un,}register_device") assumes the device_is_registered() in function nfc_dev_up() will help to check when the rfkill is unregistered. However, this check only take effect when device_del(&dev->dev) is done in nfc_unregister_device(). Hence, the rfkill object is still possible be dereferenced. The crash trace in latest kernel (5.18-rc2): [ 68.760105] ================================================================== [ 68.760330] BUG: KASAN: use-after-free in __lock_acquire+0x3ec1/0x6750 [ 68.760756] Read of size 8 at addr ffff888009c93018 by task fuzz/313 [ 68.760756] [ 68.760756] CPU: 0 PID: 313 Comm: fuzz Not tainted 5.18.0-rc2 #4 [ 68.760756] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 68.760756] Call Trace: [ 68.760756] [ 68.760756] dump_stack_lvl+0x57/0x7d [ 68.760756] print_report.cold+0x5e/0x5db [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] kasan_report+0xbe/0x1c0 [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] __lock_acquire+0x3ec1/0x6750 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? register_lock_class+0x18d0/0x18d0 [ 68.760756] lock_acquire+0x1ac/0x4f0 [ 68.760756] ? rfkill_blocked+0xe/0x60 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? mutex_lock_io_nested+0x12c0/0
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.14.283, 4.19.247, 4.9.318, 5.10.121, 5.15.46, 5.17.14, 5.18.3, 5.4.198
- CVEs
- CVE-2022-49505
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 17:56 UTC · Revision 1
Source evidence
NFC: NULL out the dev->rfkill to prevent UAF
core-osv · Original sourcePublished 26 Feb 2025, 02:13 UTC
In the Linux kernel, the following vulnerability has been resolved: NFC: NULL out the dev->rfkill to prevent UAF Commit 3e3b5dfcd16a ("NFC: reorder the logic in nfc_{un,}register_device") assumes the device_is_registered() in function nfc_dev_up() will help to check when the rfkill is unregistered. However, this check only take effect when device_del(&dev->dev) is done in nfc_unregister_device(). Hence, the rfkill object is still possible be dereferenced. The crash trace in latest kernel (5.18-rc2): [ 68.760105] ================================================================== [ 68.760330] BUG: KASAN: use-after-free in __lock_acquire+0x3ec1/0x6750 [ 68.760756] Read of size 8 at addr ffff888009c93018 by task fuzz/313 [ 68.760756] [ 68.760756] CPU: 0 PID: 313 Comm: fuzz Not tainted 5.18.0-rc2 #4 [ 68.760756] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 68.760756] Call Trace: [ 68.760756] [ 68.760756] dump_stack_lvl+0x57/0x7d [ 68.760756] print_report.cold+0x5e/0x5db [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] kasan_report+0xbe/0x1c0 [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] __lock_acquire+0x3ec1/0x6750 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? register_lock_class+0x18d0/0x18d0 [ 68.760756] lock_acquire+0x1ac/0x4f0 [ 68.760756] ? rfkill_blocked+0xe/0x60 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? mutex_lock_io_nested+0x12c0/0
osv:CVE-2022-49505
Kernel
Fixed versions: 4.9.318, 4.14.283, 4.19.247, 5.4.198, 5.10.121, 5.15.46, 5.17.14, 5.18.3
Complete source record
{
"id": "c2ed1aa3ddd223a2ae5d2d03a48bcbc599b9428c0f529ce120c92393907ba7c8",
"url": "https://osv.dev/vulnerability/CVE-2022-49505",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "NFC: NULL out the dev->rfkill to prevent UAF",
"summary": "In the Linux kernel, the following vulnerability has been resolved: NFC: NULL out the dev->rfkill to prevent UAF Commit 3e3b5dfcd16a (\"NFC: reorder the logic in nfc_{un,}register_device\") assumes the device_is_registered() in function nfc_dev_up() will help to check when the rfkill is unregistered. However, this check only take effect when device_del(&dev->dev) is done in nfc_unregister_device(). Hence, the rfkill object is still possible be dereferenced. The crash trace in latest kernel (5.18-rc2): [ 68.760105] ================================================================== [ 68.760330] BUG: KASAN: use-after-free in __lock_acquire+0x3ec1/0x6750 [ 68.760756] Read of size 8 at addr ffff888009c93018 by task fuzz/313 [ 68.760756] [ 68.760756] CPU: 0 PID: 313 Comm: fuzz Not tainted 5.18.0-rc2 #4 [ 68.760756] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 68.760756] Call Trace: [ 68.760756] [ 68.760756] dump_stack_lvl+0x57/0x7d [ 68.760756] print_report.cold+0x5e/0x5db [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] kasan_report+0xbe/0x1c0 [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] __lock_acquire+0x3ec1/0x6750 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? register_lock_class+0x18d0/0x18d0 [ 68.760756] lock_acquire+0x1ac/0x4f0 [ 68.760756] ? rfkill_blocked+0xe/0x60 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? mutex_lock_io_nested+0x12c0/0",
"evidence": "osv:CVE-2022-49505",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.9.318",
"evidence": "/affected/1/ranges"
},
{
"value": "4.14.283",
"evidence": "/affected/1/ranges"
},
{
"value": "4.19.247",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.198",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.121",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.46",
"evidence": "/affected/1/ranges"
},
{
"value": "5.17.14",
"evidence": "/affected/1/ranges"
},
{
"value": "5.18.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2022-49505",
"aliases": [
"CVE-2022-49505"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "ff169909eac9e00bf1aa0af739ba6ddfb1b1d135"
},
{
"fixed": "a8e03bcad52dc9afabf650fdbad84f739cec9efa"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "47244ac0b65bd74cc70007d8e1bac68bd2baad19"
},
{
"fixed": "f81270125b50532624400063281e6611ecd61ddf"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "c45cea83e13699bdfd47842e04d09dd43af4c371"
},
{
"fixed": "6abfaca8711803d0d7cc8c0fac1070a88509d463"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "307d2e6cebfca9d92f86c8e2c8e3dd4a8be46ba6"
},
{
"fixed": "fbf9c4c714d3cdeb98b6a18e4d057f931cad1d81"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "73a0d12114b4bc1a9def79a623264754b9df698e"
},
{
"fixed": "2a1b5110c95e4d49c8c3906270dfcde680a5a7be"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "8a9c61c3ef187d8891225f9b932390670a43a0d3"
},
{
"fixed": "1632be63862f183cd5cf1cc094e698e6ec005dfd"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "3e3b5dfcd16a3e254aab61bd1e8c417dd4503102"
},
{
"fixed": "4a68938f43b7c2663e4c90bb9bbe29ac8b9a42a0"
},
{
"fixed": "4f5d71930f41be78557f9714393179025baacd65"
},
{
"fixed": "1b0e81416a24d6e9b8c2341e22e8bf48f8b8bfc9"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4.9.291"
},
{
"fixed": "4.9.318"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4.14.256"
},
{
"fixed": "4.14.283"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4.19.218"
},
{
"fixed": "4.19.247"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.4.162"
},
{
"fixed": "5.4.198"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.10.82"
},
{
"fixed": "5.10.121"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.15.5"
},
{
"fixed": "5.15.46"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4.4.293"
},
{
"fixed": "4.5"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5ef16d2d172ee56714cff37cd005b98aba08ef5a"
}
]
}
],
"versions": [
"v4.9.317",
"v4.9.316",
"v4.9.315",
"v4.9.314",
"v4.9.313",
"v4.9.312",
"v4.9.311",
"v4.9.310",
"v4.9.309",
"v4.9.308",
"v4.9.307",
"v4.9.306",
"v4.9.305",
"v4.9.304",
"v4.9.303",
"v4.9.302",
"v4.9.301",
"v4.9.300",
"v4.9.299",
"v4.9.298",
"v4.9.297",
"v4.9.296",
"v4.9.295",
"v4.9.294",
"v4.9.293",
"v4.9.292",
"v4.9.291",
"v4.14.282",
"v4.14.281",
"v4.14.280",
"v4.14.279",
"v4.14.278",
"v4.14.277",
"v4.14.276",
"v4.14.275",
"v4.14.274",
"v4.14.273",
"v4.14.272",
"v4.14.271",
"v4.14.270",
"v4.14.269",
"v4.14.268",
"v4.14.267",
"v4.14.266",
"v4.14.265",
"v4.14.264",
"v4.14.263",
"v4.14.262",
"v4.14.261",
"v4.14.260",
"v4.14.259",
"v4.14.258",
"v4.14.257",
"v4.14.256",
"v4.19.246",
"v4.19.245",
"v4.19.244",
"v4.19.243",
"v4.19.242",
"v4.19.241",
"v4.19.240",
"v4.19.239",
"v4.19.238",
"v4.19.237",
"v4.19.236",
"v4.19.235",
"v4.19.234",
"v4.19.233",
"v4.19.232",
"v4.19.231",
"v4.19.230",
"v4.19.229",
"v4.19.228",
"v4.19.227",
"v4.19.226",
"v4.19.225",
"v4.19.224",
"v4.19.223",
"v4.19.222",
"v4.19.221",
"v4.19.220",
"v4.19.219",
"v4.19.218",
"v5.4.197",
"v5.4.196",
"v5.4.195",
"v5.4.194",
"v5.4.193",
"v5.4.192",
"v5.4.191",
"v5.4.190",
"v5.4.189",
"v5.4.188",
"v5.4.187",
"v5.4.186",
"v5.4.185",
"v5.4.184",
"v5.4.183",
"v5.4.182",
"v5.4.181",
"v5.4.180",
"v5.4.179",
"v5.4.178",
"v5.4.177",
"v5.4.176",
"v5.4.175",
"v5.4.174",
"v5.4.173",
"v5.4.172",
"v5.4.171",
"v5.4.170",
"v5.4.169",
"v5.4.168",
"v5.4.167",
"v5.4.166",
"v5.4.165",
"v5.4.164",
"v5.4.163",
"v5.4.162",
"v5.10.120",
"v5.10.119",
"v5.10.118",
"v5.10.117",
"v5.10.116",
"v5.10.115",
"v5.10.114",
"v5.10.113",
"v5.10.112",
"v5.10.111",
"v5.10.110",
"v5.10.109",
"v5.10.108",
"v5.10.107",
"v5.10.106",
"v5.10.105",
"v5.10.104",
"v5.10.103",
"v5.10.102",
"v5.10.101",
"v5.10.100",
"v5.10.99",
"v5.10.98",
"v5.10.97",
"v5.10.96",
"v5.10.95",
"v5.10.94",
"v5.10.93",
"v5.10.92",
"v5.10.91",
"v5.10.90",
"v5.10.89",
"v5.10.88",
"v5.10.87",
"v5.10.86",
"v5.10.85",
"v5.10.84",
"v5.10.83",
"v5.10.82",
"v5.15.45",
"v5.15.44",
"v5.15.43",
"v5.15.42",
"v5.15.41",
"v5.15.40",
"v5.15.39",
"v5.15.38",
"v5.15.37",
"v5.15.36",
"v5.15.35",
"v5.15.34",
"v5.15.33",
"v5.15.32",
"v5.15.31",
"v5.15.30",
"v5.15.29",
"v5.15.28",
"v5.15.27",
"v5.15.26",
"v5.15.25",
"v5.15.24",
"v5.15.23",
"v5.15.22",
"v5.15.21",
"v5.15.20",
"v5.15.19",
"v5.15.18",
"v5.15.17",
"v5.15.16",
"v5.15.15",
"v5.15.14",
"v5.15.13",
"v5.15.12",
"v5.15.11",
"v5.15.10",
"v5.15.9",
"v5.15.8",
"v5.15.7",
"v5.15.6",
"v5.15.5",
"v4.4.302",
"v4.4.301",
"v4.4.300",
"v4.4.299",
"v4.4.298",
"v4.4.297",
"v4.4.296",
"v4.4.295",
"v4.4.294",
"v4.4.293"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49505.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.9.318"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.10.0"
},
{
"fixed": "4.14.283"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.19.247"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.198"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.121"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.46"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "5.17.14"
},
{
"fixed": "5.18.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49505.json"
}
}
],
"modified": "2026-10-28T02:30:38.400048787Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/1632be63862f183cd5cf1cc094e698e6ec005dfd",
"https://git.kernel.org/stable/c/1b0e81416a24d6e9b8c2341e22e8bf48f8b8bfc9",
"https://git.kernel.org/stable/c/2a1b5110c95e4d49c8c3906270dfcde680a5a7be",
"https://git.kernel.org/stable/c/4a68938f43b7c2663e4c90bb9bbe29ac8b9a42a0",
"https://git.kernel.org/stable/c/4f5d71930f41be78557f9714393179025baacd65",
"https://git.kernel.org/stable/c/6abfaca8711803d0d7cc8c0fac1070a88509d463",
"https://git.kernel.org/stable/c/a8e03bcad52dc9afabf650fdbad84f739cec9efa",
"https://git.kernel.org/stable/c/f81270125b50532624400063281e6611ecd61ddf",
"https://git.kernel.org/stable/c/fbf9c4c714d3cdeb98b6a18e4d057f931cad1d81",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49505.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49505",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49505.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49505",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505529,
"published_at": "2025-02-26T02:13:37.496+00:00"
}