From: Sriram Sriram <sriramsriram@linux.microsoft.com>
To: u-boot@lists.u-boot-project.org
Cc: Tom Rini <trini@konsulko.com>,
Jerome Forissier <jerome.forissier@arm.com>,
Drew Kluemke <ankluemk@microsoft.com>,
Daniel Munic <v-dmunic@microsoft.com>,
Sriram Sriram <sriramsriram@linux.microsoft.com>
Subject: [PATCH v2 0/3] Bounds hardening in NFS, TFTP and ext4
Date: Tue, 15 Sep 2026 13:52:07 -0700 [thread overview]
Message-ID: <20260915205210.260404-1-sriramsriram@linux.microsoft.com> (raw)
In-Reply-To: <20260909192016.217183-1-sriramsriram@linux.microsoft.com>
Three independent hardening fixes found by internal static analysis and
code review. They do not depend on each other.
Changes in v2:
- Dropped "boot: image-fit: add overflow guard for FIT decompression
buffer" (2/4 in v1). As Tom pointed out, max_decomp_len is used both
as the allocation size and as the unc_len bound handed to
image_decomp(), so a wrapped multiply cannot leave the bound larger
than the buffer, and image_decomp() already fails cleanly on a bound
that is too small. The claim in that commit message was wrong, so the
patch is withdrawn rather than reworded.
- net: tftp: replaced the four bounded strncasecmp() comparisons with a
single check that the packet ends in a NUL, per Tom's review. It is
smaller (+16 bytes of .text on am335x_evm_defconfig instead of +24)
and it also covers the dectoul() calls, which v1 left unbounded.
Retitled to match.
- Rebased onto current master (a44f46af0aa).
- No change to the NFS and ext4 patches.
Daniel Munic (1):
fs: ext4: widen ext4fs_update() block-group loop counter
Drew Kluemke (2):
net: nfs: add bounds checks on memcpy into stack-allocated rpc_pkt
net: tftp: verify the OACK packet is NUL terminated
fs/ext4/ext4_write.c | 2 +-
net/nfs-common.c | 10 ++++++++++
net/tftp.c | 7 +++++++
3 files changed, 18 insertions(+), 1 deletion(-)
--
2.49.0
next prev parent reply other threads:[~2026-09-15 20:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 19:20 [PATCH 0/4] Bounds/overflow hardening in NFS, FIT, TFTP and ext4 Sriram Sriram
2026-09-09 19:20 ` [PATCH 1/4] net: nfs: add bounds checks on memcpy into stack-allocated rpc_pkt Sriram Sriram
2026-09-09 19:20 ` [PATCH 2/4] boot: image-fit: add overflow guard for FIT decompression buffer Sriram Sriram
2026-09-10 19:09 ` Tom Rini
2026-09-09 19:20 ` [PATCH 3/4] net: tftp: use bounded string compare for OACK option parsing Sriram Sriram
2026-09-10 19:25 ` Tom Rini
2026-09-09 19:20 ` [PATCH 4/4] fs: ext4: widen ext4fs_update() block-group loop counter Sriram Sriram
2026-09-15 20:52 ` Sriram Sriram [this message]
2026-09-15 20:52 ` [PATCH v2 1/3] net: nfs: add bounds checks on memcpy into stack-allocated rpc_pkt Sriram Sriram
2026-09-17 9:03 ` Jerome Forissier
2026-09-15 20:52 ` [PATCH v2 2/3] net: tftp: verify the OACK packet is NUL terminated Sriram Sriram
2026-09-17 8:51 ` Jerome Forissier
2026-09-15 20:52 ` [PATCH v2 3/3] fs: ext4: widen ext4fs_update() block-group loop counter Sriram Sriram
2026-09-15 21:23 ` Tony Dinh
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=20260915205210.260404-1-sriramsriram@linux.microsoft.com \
--to=sriramsriram@linux.microsoft.com \
--cc=ankluemk@microsoft.com \
--cc=jerome.forissier@arm.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=v-dmunic@microsoft.com \
/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;
as well as URLs for NNTP newsgroup(s).