-
Notifications
You must be signed in to change notification settings - Fork 10
[LTS 8.8] net: tls, update curr on splice as well #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ciqlts8_8
Are you sure you want to change the base?
Conversation
jira VULN-6841 cve CVE-2024-0646 commit-author John Fastabend <[email protected]> commit c5a5950 upstream-diff used linux-stable LT-5.15 sha ba5efd8 commit c5a5950 upstream. The curr pointer must also be updated on the splice similar to how we do this for other copy types. Fixes: d829e9c ("tls: convert to generic sk_msg interface") Signed-off-by: John Fastabend <[email protected]> Reported-by: Jann Horn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit ba5efd8) Signed-off-by: Marcin Wcisło <[email protected]>
Yeah the "fixes" is buried deep in the origin of Rocky8
I also stash all the failed backports:
Its not been super useful yet(and may not continue in the future) but it comes from this rebuild which contained 12,000 commits and only could cleanly pick 86% The above grep is why we make empty commits for failed backports so hopefully we can There is a bit of a learning curve with this kernel setup but the other options is we just have the big |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's where I got this ciq/ciq_backports/kernel-4.18.0-147.el8/d829e9c4.failed from. This tool I used in the "Appendix" section is aware of those
One thing with empty commits to be aware of is that they disappear when logging a specific file's history, like It is helpful, this backengineered history, definitely better to have 14% out of 12k to be lumped into one ommit than 100%. Good job 👍. The blobs are done for a reason, and this reason is exactly to make the life of the engineer working with this source code harder 😅 Coming back to the PR, I wasn't really convinced that it was d829e9c which actually introduced the bug, but I guess I will have to trust John Fasteband on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥌
Yeah, you can only be an expert in so much when you have a start up sized operation or are being a kernel generalist so you trust and verify as much as you can. Thanks for diving and learning the fun world of EL Kernel ABI stability and what that does to the kernel versus upstream its usually extremely unsettling the first big thing you run into and when it happens again you're kinda prepared with a "sigh" and know it will be a while before you're done. |
[LTS 8.8]
CVE-2024-0646
VULN-6841
Problem
https://access.redhat.com/security/cve/CVE-2024-0646
Applicability analysis
The
tls
module is enabled inciqlts8_8
:The commit referenced in the mainline fix c5a5950 as introducing the bug is d829e9c. It's present in the history of LTS 9.4 and upstream stable Linux 5.15 where the fix was backported in 8ad16a7 and ba5efd8, respectively. Similar situation for the recently merged PR #305 for LTS 9.2.
The referenced commit d829e9c is not present in official stable Linux 4.18, which is most probably the reason the fix wasn't backported to any stable relase older than 5.4. However, it can be found in the "Rebuild_History BUILDABLE"-type commit e19ec64 of Rocky LTS 8.8 (see ciq/ciq_backports/kernel-4.18.0-147.el8/d829e9c4.failed).
Based on this it was concluded that the vulnerability applies to
ciqlts8_8
.Solution
The solution for
ciqlts8_8
is the same as inciqlts9_2
, because the functiontls_sw_do_sendpage
modified inciqlts9_2
is exactly the same as inciqlts8_8
. For the explanation of the fix inciqlts9_2
please see #305.kABI check: passed
Boot test: passed
boot-test.log
Kselftests
Coverage
android
,bpf
(excepttest_sockmap
,test_xsk.sh
,test_progs-no_alu32
,test_kmod.sh
,test_progs
),breakpoints
,capabilities
,cgroup
,core
,cpu-hotplug
,cpufreq
,drivers/net/bonding
,drivers/net/team
,exec
,firmware
,fpu
,ftrace
,futex
,gpio
,intel_pstate
,ipc
,kcmp
,kexec
,kvm
,lib
,livepatch
,membarrier
,memfd
,memory-hotplug
,mount
,mqueue
,net/forwarding
(exceptsch_tbf_prio.sh
,mirror_gre_vlan_bridge_1q.sh
,mirror_gre_bridge_1d_vlan.sh
,ipip_hier_gre_keys.sh
,sch_tbf_ets.sh
,sch_tbf_root.sh
,tc_actions.sh
,sch_ets.sh
),net/mptcp
(exceptsimult_flows.sh
),net
(excepttxtimestamp.sh
,reuseport_addr_any.sh
,udpgso_bench.sh
,udpgro_fwd.sh
,ip_defrag.sh
,gro.sh
,reuseaddr_conflict
,xfrm_policy.sh
),netfilter
(exceptnft_trans_stress.sh
),nsfs
,pstore
,ptrace
,rseq
,sgx
,sigaltstack
,size
,splice
,static_keys
,tc-testing
,tdx
,timens
,timers
(exceptraw_skew
),tpm2
,vm
,x86
,zram
Reference
kselftests–ciqlts8_8–run1.log
kselftests–ciqlts8_8–run2.log
Patch
kselftests–ciqlts8_8-CVE-2024-0646–run1.log
kselftests–ciqlts8_8-CVE-2024-0646–run2.log
Comparison
The reference and patched kernel results are the same
In particular the
net:tls
test is passing in both versions, with the same logs:Specific tests: skipped
Appendix
Below is an improved version of a similar table given in the appendix of #305, but with "Rebuild_History BUILDABLE"-type commits included, which left no commit from the
net/tls/tls_sw.c
history for LTS 8.6, 8.8, 9.2, 9.4 not cross-referenced.tls_sw-history.txt
Symbols:
=
: exact same commit,~
: cherry-picked backport,#
: rebuild-type bulk commit with all the cherry-picks which failed to be~
.