oss-sec mailing list archives
Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch
From: Jacob Bachmeyer <jcb62281 () gmail com>
Date: Fri, 12 Jul 2024 21:17:00 -0500
Steffen Nurpmeso wrote:
[...] So if someone says "this was a source of denial‐of‐service attacks" then i need to wrap my head, and it is not as if an in-between-the-lines reference to MAP_DENYWRITE ring any bells except that i think the flag has been removed.
The manpage indicates that, long ago, a mapping with MAP_DENYWRITE would effectively make the underlying file read-only, even to root, for as long as the mapping exists.
And then someone who seems to know uses it nonetheless in a small showcase program, likely trying to say even more in-between-the-lines.
That commit message seems to indicate that the program was using SHM_HUGETLB when it should have been using MAP_HUGETLB, those constants represent different bits, and passing SHM_HUGETLB to mmap(2) will be interpreted as MAP_DENYWRITE, and therefore ignored. Presumably, there is some other syscall (likely shmat(2)) that uses that bit (represented under the constant SHM_HUGETLB) to request huge pages, and the test program in question was supposed to get huge pages from mmap(2) but was not actually asking for huge pages because it was using the wrong constant.
In other words, MAP_DENYWRITE was not being intentionally used at all. Another constant, for a different set of flags, that happens to have the same value, was being used, causing a quiet bug. (The test program would have still worked, but was not actually exercising huge pages as intended.)
-- Jacob
Current thread:
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch, (continued)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Florian Weimer (Jul 08)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Simon McVittie (Jul 08)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Will Dormann (Jul 08)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Yves-Alexis Perez (Jul 10)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Will Dormann (Jul 10)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Yves-Alexis Perez (Jul 11)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Yves-Alexis Perez (Jul 11)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Will Dormann (Jul 10)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Steffen Nurpmeso (Jul 10)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch David A. Wheeler (Jul 11)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Steffen Nurpmeso (Jul 12)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Jacob Bachmeyer (Jul 13)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Steffen Nurpmeso (Jul 13)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Demi Marie Obenour (Jul 14)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Steffen Nurpmeso (Jul 15)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Jacob Bachmeyer (Jul 14)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Steffen Nurpmeso (Jul 15)
- Re: ASLRn't is still alive and well on x86 kernels, despite CVE-2024-26621 patch Will Dormann (Jul 30)
