From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [oss-security] [CVE-2021-29154] Linux kernel incorrect computation of branch displacements in BPF JIT compiler can be abused to execute arbitrary code in Kernel mode
Date: Sat, 10 Apr 2021 10:27:59 +0100 [thread overview]
Message-ID: <428CDFC6-DC20-4EF2-95E9-A95C48E1DB6E@ipfire.org> (raw)
In-Reply-To: <50fdffcf-7412-c9bf-724d-1e336a85127a@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]
Seen it. Not surprising at all, but hopefully useful as a learning experience.
> On 10 Apr 2021, at 10:24, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>
> And *BOOM* goes the dynamite... m(
>
>> An issue has been discovered in the Linux kernel that can be abused by
>> unprivileged local users to escalate privileges.
>>
>> The issue is with how BPF JIT compilers for some architectures compute
>> branch displacements when generating machine code. This can be abused
>> to craft anomalous machine code and execute it in the Kernel mode,
>> where the control flow is hijacked to execute unsafe code.
>>
>> I developed PoCs for x86-64 and x86-32 architectures to demonstrate
>> shellcode execution in Kernel mode by unprivileged local users.
>>
>> One of these PoCs has been shared privately with <security(a)kernel.org>
>> to assist with fix development.
>>
>> Patches to mitigate the issue for x86-64 and x86-32 architectures are
>> available. These patches do not attempt to correct the underlying
>> algorithm and instead assert that all computations were performed
>> correctly, such that all unsafe inputs are rejected.
>>
>> The patches were published via BPF subsystem public git repository:
>> * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=e4d4d456436bfb2fe412ee2cd489f7658449b098
>> * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=26f55a59dc65ff77cd1c4b37991e26497fc68049
>>
>> # Discoverer
>>
>> Piotr Krysiuk <piotras(a)gmail.com>
>>
>> # References
>>
>> CVE-2021-29154 (reserved via https://cveform.mitre.org/)
prev parent reply other threads:[~2021-04-10 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 9:24 Fwd: " Peter Müller
2021-04-10 9:27 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=428CDFC6-DC20-4EF2-95E9-A95C48E1DB6E@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox