[LTS 8.6] KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache #455
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-2024-26598
VULN-8188
Problem
https://access.redhat.com/security/cve/CVE-2024-26598
Applicability: yes
(The reasoning is similar as in #454)
No clear "fixes" commit provided in the mainline fix ad362fe to check
ciqlts8_6
's history for, but the applicability of the bug is highly likely, given that:The patch was applied to Linux stable 5.15 in 12c2759.
The affected file
arch/arm64/kvm/vgic/vgic-its.c
barely differs betweenlinux-5.15.y
andciqlts8_6
. Compare the histories oflinux-5.15.y
,ciqlts8_6
andkernel-mainline
for reference (this is around 30% of its history, with the additional 106 commits of this file under previous pathvirt/kvm/arm/vgic/vgic-its.c
shared one-to-one between all versions):The
ciqlts8_6
file's history is virtually the same before the ad362fe patch as that oflinux-5.15.y
, sans three unrelated commits.The racing "DISCARD command" mentioned in the mainline's fix ad362fe message can be found in
ciqlts8_6
's version of thearch/arm64/kvm/vgic/vgic-its.c
file:kernel-src-tree/arch/arm64/kvm/vgic/vgic-its.c
Lines 848 to 853 in a2c9ebd
The similarity argument (2) along with the appeal-to-authority (1) only makes sense if the prerequisites for the UAF scenario are contained within the
arch/arm64/kvm/vgic/vgic-its.c
file, but this, in turn, is strongly suggested by (3).These arguments are heuristic, but fully understanding the potential UAF scenario described in the bug and checking
ciqlts8_6
's code against it would be prohibitively time consuming.Solution
The mainline fix ad362fe applies without any changes.
kABI check: passed
Boot test: passed
boot-test.log
Kselftests: passed relative
The tests were run on the same platform as those for
ciqlts9_2
in #454. Regarding thekvm:*
tests collection the exact same issue applies here as well - see #454 for details.Coverage
Including the eventually omitted tests.
breakpoints
(exceptbreakpoint_test
,step_after_suspend_test
),capabilities
,core
,cpu-hotplug
,cpufreq
,efivarfs
,exec
,firmware
,fpu
,ftrace
,futex
,gpio
,intel_pstate
,ipc
,kcmp
,lib
,livepatch
,membarrier
,memfd
,memory-hotplug
,mount
,net/forwarding
(exceptsch_ets.sh
,mirror_gre_vlan_bridge_1q.sh
,ipip_hier_gre_keys.sh
,sch_tbf_ets.sh
,sch_tbf_prio.sh
,mirror_gre_bridge_1d_vlan.sh
,tc_actions.sh
,sch_tbf_root.sh
),net/mptcp
(exceptmptcp_join.sh
,simult_flows.sh
),net
(exceptip_defrag.sh
,udpgro_fwd.sh
,reuseport_addr_any.sh
,gro.sh
,txtimestamp.sh
,xfrm_policy.sh
,udpgso_bench.sh
),netfilter
(exceptnft_trans_stress.sh
),nsfs
,proc
(exceptsetns-dcache
),pstore
,ptrace
,sgx
,sigaltstack
,size
,splice
,static_keys
,tc-testing
,timens
,timers
(exceptraw_skew
),tpm2
,vm
,zram
.Reference
kselftests–ciqlts8_6–run1.log
kselftests–ciqlts8_6–run2.log
Patch
kselftests–ciqlts8_6-CVE-2024-26598–run1.log
kselftests–ciqlts8_6-CVE-2024-26598–run2.log
Comparison
The tests results for the reference kernel and the patch are the same.
Specific tests: skipped