All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Shahriyar Jalayeri <shahriyar@byteray.co.uk>
Cc: u-boot@lists.u-boot-project.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Joao Marcos Costa <joaomarcos.costa@bootlin.com>,
	u-boot@lists.denx.de, Richard Genoud <richard.genoud@bootlin.com>,
	Michael Zimmermann <sigmaepsilon92@gmail.com>,
	Eric Kilmer <eric.kilmer@trailofbits.com>,
	Argus <argus@byteray.co.uk>
Subject: Re: [PATCH v2 0/2] fs/squashfs: fix directory table integer overflow
Date: Wed, 26 Aug 2026 16:32:36 -0600	[thread overview]
Message-ID: <20260826223236.GA3986474@bill-the-cat> (raw)
In-Reply-To: <20260728-sqfs-oob-fix-v2-0-077d9f0e01c4@byteray.co.uk>

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

On Tue, Jul 28, 2026 at 08:55:38AM +0200, Shahriyar Jalayeri wrote:

> This fixes an integer overflow in the SquashFS directory-table reader
> that leads to a heap out-of-bounds write, and adds a regression test.
> 
> sqfs_read_directory_table() sizes the directory table with an int
> multiply (metablks_count * SQFS_METADATA_BLOCK_SIZE) that wraps for a
> crafted image, under-allocating the buffer that the fill loop then
> overruns. It is reached by listing or reading the image (sqfsls /
> sqfsload). Patch 1 guards the allocation with __builtin_mul_overflow();
> patch 2 adds a test that a crafted image is rejected.
> 
> Based on v2026.07 (fdfe2ec48d5c). A reproducer is available on request.
> 
> Signed-off-by: Shahriyar Jalayeri <shahriyar@byteray.co.uk>
> ---
> Changes in v2:
> - Use my real name in the From and Signed-off-by

Any feedback from the squashfs custodians? Thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2026-08-26 22:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  6:55 [PATCH v2 0/2] fs/squashfs: fix directory table integer overflow Shahriyar Jalayeri
2026-07-28  6:55 ` [PATCH v2 1/2] fs/squashfs: fix integer overflow in directory table allocation Shahriyar Jalayeri
2026-07-28  6:55 ` [PATCH v2 2/2] test: squashfs: add directory table overflow regression test Shahriyar Jalayeri
2026-08-26 22:32 ` Tom Rini [this message]
2026-08-27  7:25   ` [PATCH v2 0/2] fs/squashfs: fix directory table integer overflow Richard GENOUD
2026-08-27 23:53 ` Tom Rini

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=20260826223236.GA3986474@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=argus@byteray.co.uk \
    --cc=eric.kilmer@trailofbits.com \
    --cc=joaomarcos.costa@bootlin.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard.genoud@bootlin.com \
    --cc=shahriyar@byteray.co.uk \
    --cc=sigmaepsilon92@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-boot@lists.u-boot-project.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.