From: Edward Liaw <edliaw@google.com>
To: stable@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>
Cc: bpf@vger.kernel.org, kernel-team@android.com,
Edward Liaw <edliaw@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4.14 v2 0/4] BPF fixes for CVE-2021-3444 and CVE-2021-3600
Date: Wed, 22 Feb 2023 19:29:20 +0000 [thread overview]
Message-ID: <20230222192925.1778183-1-edliaw@google.com> (raw)
Thadeu Lima de Souza Cascardo originally sent this patch but it failed to
merge because of a compilation error:
https://lore.kernel.org/bpf/20210830183211.339054-1-cascardo@canonical.com/T/
v2:
Removed redefinition of tmp to fix compilation with CONFIG_BPF_JIT_ALWAYS_ON
enabled.
-Edward
==
The upstream changes necessary to fix these CVEs rely on the presence of JMP32,
which is not a small backport and brings its own potential set of necessary
follow-ups.
Daniel Borkmann, John Fastabend and Alexei Starovoitov came up with a fix
involving the use of the AX register.
This has been tested against the test_verifier in 4.14.y tree and some tests
specific to the two referred CVEs. The test_bpf module was also tested.
Daniel Borkmann (4):
bpf: Do not use ax register in interpreter on div/mod
bpf: fix subprog verifier bypass by div/mod by 0 exception
bpf: Fix 32 bit src register truncation on div/mod
bpf: Fix truncation handling for mod32 dst reg wrt zero
include/linux/filter.h | 24 ++++++++++++++++++++++++
kernel/bpf/core.c | 39 ++++++++++++++-------------------------
kernel/bpf/verifier.c | 39 +++++++++++++++++++++++++++++++--------
net/core/filter.c | 9 ++++++++-
4 files changed, 77 insertions(+), 34 deletions(-)
base-commit: a8ad60f2af5884921167e8cede5784c7849884b2
--
2.39.2.637.g21b0678d19-goog
next reply other threads:[~2023-02-22 19:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 19:29 Edward Liaw [this message]
2023-02-22 19:29 ` [PATCH 4.14 v2 1/4] bpf: Do not use ax register in interpreter on div/mod Edward Liaw
2023-02-23 9:01 ` Greg KH
2023-02-23 18:46 ` Edward Liaw
2023-02-23 20:09 ` Greg KH
2023-02-23 21:29 ` Edward Liaw
2023-02-22 19:29 ` [PATCH 4.14 v2 2/4] bpf: fix subprog verifier bypass by div/mod by 0 exception Edward Liaw
2023-02-22 19:29 ` [PATCH 4.14 v2 3/4] bpf: Fix 32 bit src register truncation on div/mod Edward Liaw
2023-02-22 19:29 ` [PATCH 4.14 v2 4/4] bpf: Fix truncation handling for mod32 dst reg wrt zero Edward Liaw
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=20230222192925.1778183-1-edliaw@google.com \
--to=edliaw@google.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.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