[LTS 8.6] CVE-2022-42720 #593
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[LTS 8.6]
CVE-2022-42720
VULN-3807
Problem
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0b7808818cb9df6680f98996b8e9a439fa7bcc2f
Affected: yes
The official bug source tagged by the bug fix 0b78088 is a3584f5. This commit can't be found in
ciqlts8_6
's history neither natively nor as a backport, although the code introduced by a3584f5 can be found in the bulk commit e19ec64. Along with the naive cherry-pick generating conflicts this situation required a case-by-case analysis of the issues addressed by 0b78088 to confirm their applicability to LTS 8.6 codebase.bss_ref_get()
This bug applies to LTS 8.6 with the code path being
kernel-src-tree/net/wireless/scan.c
Lines 147 to 149 in 0f0d831
then
kernel-src-tree/net/wireless/scan.c
Line 152 in 0f0d831
cfg80211_bss_update()
This bug applies to LTS 8.6. Below the description interspersed with links to the relevant
ciqlts8_6
code fragments:kernel-src-tree/net/wireless/scan.c
Line 1733 in 0f0d831
kernel-src-tree/net/wireless/scan.c
Line 1759 in 0f0d831
kernel-src-tree/net/wireless/scan.c
Line 1766 in 0f0d831
kernel-src-tree/net/wireless/scan.c
Line 181 in 0f0d831
kernel-src-tree/net/wireless/scan.c
Lines 1777 to 1778 in 0f0d831
cfg80211_inform_single_bss_data()
This bug applies to LTS 8.6. Failure of adding to the nontransmitted list and unlinking:
kernel-src-tree/net/wireless/scan.c
Lines 1985 to 1989 in 0f0d831
Returning the value without a reference:
kernel-src-tree/net/wireless/scan.c
Line 1994 in 0f0d831
It was arguably introduced earlier than a3584f5, namely in 0b8fb82.
Solution
Applying 0b78088 required pulling in 8a610cf to avoid conflicts for the cfg80211_inform_single_bss_data() case. Coincidentally, another bug was fixed with it (no CVE associated). From the commit's message:
kABI check: passed
Boot test: passed
boot-test.log
Kselftests: passed relative
Reference
kselftests–ciqlts8_6–run1.log
Patch
kselftests–ciqlts8_6-CVE-2022-42720–run1.log
kselftests–ciqlts8_6-CVE-2022-42720–run2.log
Comparison
The tests results for the reference and the patch are the same.