In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected
When we are not connected to a channel, sending channel "switch" announcement doesn't make any sense.
The BSS list is empty in that case. This causes the for loop in cfg80211getbss() to be bypassed, so the function returns NULL (check line 1424 of net/wireless/scan.c), causing the WARNON() in ieee80211ibsscsabeacon() to get triggered (check line 500 of net/mac80211/ibss.c), which was consequently reported on the syzkaller dashboard.
Thus, check if we have an existing connection before generating the CSA beacon in ieee80211ibssfinish_csa().
[ { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d9eb37db6a28b59a95a3461450ee209654c5f95b", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 585.0, "function_hash": "333390993942637731059164483754532729962" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-082ee2fe" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@552ba102a6898630a7d16887f29e606d6fabe508", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 510.0, "function_hash": "322835013263526808083798774421158996549" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-346b4acc" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdb9a8da9b84800eb15506cd9363cf0cf059e677", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "148124815643105973899150773098991924612", "83815940903208007239956380877340860334", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-3820a8d6" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1691a48aef0a82d1754b9853dae7e3f5cacdf70b", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "148124815643105973899150773098991924612", "83815940903208007239956380877340860334", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-55aa1b6f" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@552ba102a6898630a7d16887f29e606d6fabe508", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "277672531121244069004726578718116086160", "311465359927968998608608759534639969579", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-6a103a39" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@66689c5c02acd4d76c28498fe220998610aec61e", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 585.0, "function_hash": "333390993942637731059164483754532729962" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-7403b110" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dd649b49219a0388cc10fc40e4c2ea681566a780", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "277672531121244069004726578718116086160", "311465359927968998608608759534639969579", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-947d39af" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1691a48aef0a82d1754b9853dae7e3f5cacdf70b", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 585.0, "function_hash": "333390993942637731059164483754532729962" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-98730519" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d9eb37db6a28b59a95a3461450ee209654c5f95b", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "148124815643105973899150773098991924612", "83815940903208007239956380877340860334", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-989cdb74" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdb9a8da9b84800eb15506cd9363cf0cf059e677", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 585.0, "function_hash": "333390993942637731059164483754532729962" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-9cc7b774" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@864e280cb3a9a0f5212b16ef5057c4e692f7039d", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 510.0, "function_hash": "322835013263526808083798774421158996549" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-b3017f6a" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15bc8966b6d3a5b9bfe4c9facfa02f2b69b1e5f0", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 530.0, "function_hash": "164971647115079620462426185364026658353" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-b6bd93e0" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dd649b49219a0388cc10fc40e4c2ea681566a780", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c", "function": "ieee80211_ibss_finish_csa" }, "digest": { "length": 510.0, "function_hash": "322835013263526808083798774421158996549" }, "deprecated": false, "signature_type": "Function", "id": "CVE-2022-49942-b8b0caef" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@66689c5c02acd4d76c28498fe220998610aec61e", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "148124815643105973899150773098991924612", "83815940903208007239956380877340860334", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-c077895f" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@864e280cb3a9a0f5212b16ef5057c4e692f7039d", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "277672531121244069004726578718116086160", "311465359927968998608608759534639969579", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-ca45ce2d" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15bc8966b6d3a5b9bfe4c9facfa02f2b69b1e5f0", "signature_version": "v1", "target": { "file": "net/mac80211/ibss.c" }, "digest": { "line_hashes": [ "277672531121244069004726578718116086160", "311465359927968998608608759534639969579", "137966977051083686178835396384211549698" ], "threshold": 0.9 }, "deprecated": false, "signature_type": "Line", "id": "CVE-2022-49942-f835931d" } ]