wifi: mac80211: fix use-after-free in chanctx code
In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: fix use-after-free in chanctx code In ieee80211_vif_use_reserved_context(), when we have an old context and the new context's replace_state is set to IEEE80211_CHANCTX_REPLACE_NONE, we free the old context in ieee80211_vif_use_reserved_reassign(). Therefore, we cannot check the old_ctx anymore, so we should set it to NULL after this point. However, since the new_ctx replace state is clearly not IEEE80211_CHANCTX_REPLACES_OTHER, we're not going to do anything else in this function and can just return to avoid accessing the freed old_ctx.
- 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-49416
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:59 UTC · Revision 1
Source evidence
wifi: mac80211: fix use-after-free in chanctx code
core-osv · Original sourcePublished 26 Feb 2025, 02:12 UTC
In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: fix use-after-free in chanctx code In ieee80211_vif_use_reserved_context(), when we have an old context and the new context's replace_state is set to IEEE80211_CHANCTX_REPLACE_NONE, we free the old context in ieee80211_vif_use_reserved_reassign(). Therefore, we cannot check the old_ctx anymore, so we should set it to NULL after this point. However, since the new_ctx replace state is clearly not IEEE80211_CHANCTX_REPLACES_OTHER, we're not going to do anything else in this function and can just return to avoid accessing the freed old_ctx.
osv:CVE-2022-49416
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": "81d1b2020c117c606d505f62db78155ba4c75b81dbe688e46d047f551cb2fc87",
"url": "https://osv.dev/vulnerability/CVE-2022-49416",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "wifi: mac80211: fix use-after-free in chanctx code",
"summary": "In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: fix use-after-free in chanctx code In ieee80211_vif_use_reserved_context(), when we have an old context and the new context's replace_state is set to IEEE80211_CHANCTX_REPLACE_NONE, we free the old context in ieee80211_vif_use_reserved_reassign(). Therefore, we cannot check the old_ctx anymore, so we should set it to NULL after this point. However, since the new_ctx replace state is clearly not IEEE80211_CHANCTX_REPLACES_OTHER, we're not going to do anything else in this function and can just return to avoid accessing the freed old_ctx.",
"evidence": "osv:CVE-2022-49416",
"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-49416",
"aliases": [
"CVE-2022-49416"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:A/AC:L/PR:N/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": "5bcae31d9cb1ebfad3ad5a3eea04c8cdc329a04f"
},
{
"fixed": "88cc8f963febe192d6ded9df7217f92f380b449a"
},
{
"fixed": "4ba81e794f0fad6234f644c2da1ae14d5b95e1c4"
},
{
"fixed": "9f1e5cc85ad77e52f54049a94db0407445ae2a34"
},
{
"fixed": "265bec4779a38b65e86a25120370f200822dfa76"
},
{
"fixed": "6118bbdf69f4718b02d26bbcf2e497eb66004331"
},
{
"fixed": "b79110f2bf6022e60e590d2e094728a8eec3e79e"
},
{
"fixed": "82c8e7bbdd06c7ed58e22450cc5b37f33a25bb2c"
},
{
"fixed": "4f05a9e15edcdf5b97e0d86ab6ecd5f187289f6c"
},
{
"fixed": "2965c4cdf7ad9ce0796fac5e57debb9519ea721e"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49416.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "3.17.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"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.18.0"
},
{
"fixed": "5.18.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49416.json"
}
}
],
"modified": "2026-10-28T02:30:37.786278356Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/265bec4779a38b65e86a25120370f200822dfa76",
"https://git.kernel.org/stable/c/2965c4cdf7ad9ce0796fac5e57debb9519ea721e",
"https://git.kernel.org/stable/c/4ba81e794f0fad6234f644c2da1ae14d5b95e1c4",
"https://git.kernel.org/stable/c/4f05a9e15edcdf5b97e0d86ab6ecd5f187289f6c",
"https://git.kernel.org/stable/c/6118bbdf69f4718b02d26bbcf2e497eb66004331",
"https://git.kernel.org/stable/c/82c8e7bbdd06c7ed58e22450cc5b37f33a25bb2c",
"https://git.kernel.org/stable/c/88cc8f963febe192d6ded9df7217f92f380b449a",
"https://git.kernel.org/stable/c/9f1e5cc85ad77e52f54049a94db0407445ae2a34",
"https://git.kernel.org/stable/c/b79110f2bf6022e60e590d2e094728a8eec3e79e",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49416.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49416",
"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-49416.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49416",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505031,
"published_at": "2025-02-26T02:12:37.173+00:00"
}