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-25265
VULN-3787
Problem
The problem associated with CVE-2022-25265 doesn't seem to be presented clearly, or at least it's not clear how the clearly presented behavior is a problem, let alone how the solution for it should look like.
The CVE.org and NIST say
The "references" list contains a github project https://github.com/x0reaxeax/exec-prot-bypass with a POC and a link to the kernel commit 1c33bb0. What's important, this commit is not a bugfix, and neither a bug source. In fact, it doesn't seem related to the problem at all, being probably just the latest revision of the
arch/x86/include/asm/elf.h
file at the time of linking it by the POC author.The POC on github is a C program, which, when compiled in a specific environment (ancient versions of gcc and kernel) is able to, when run on a current kernel, execute its own data block, which in principle should not be possible.
The cited header fragment documents kernel's behavior when dealing with an ELF file without a
PT_GNU_STACK
segment:kernel-src-tree/arch/x86/include/asm/elf.h
Lines 262 to 285 in 8b789f2
The POC targets the
exec-all
cases (first row, first and second column), as mentioned in the README:As such the POC simply showcases a feature introduced at the very beginning of repository in 1da177e
kernel-src-tree/include/asm-i386/elf.h
Lines 122 to 126 in 1da177e
documented in 9d9e435 and explained in 1223061:
It's not clear whether it's even a vulnerability, and in case it is, it's not clear whether solving it is the reponsibility of the kernel providers (changing the permissions policy for ELFs without
PT_GNU_STACK
?) or the providers of binaries in the repositories of a distribution (simply making sure they aren't compiled with ancient tools which they certainly aren't anyway?). In case of the former the official "fix" doesn't exist, so it would have to be handcrafted.For reference:
Debian's security response:
Ubuntu's security response:
Suse's security response:
Considering all of the above the proposed solution is to mark CVE-2022-25265 for LTS 8.6 Rocky version as "won't fix".