From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>
Cc: u-boot@lists.denx.de, jmcosta944@gmail.com,
thomas.petazzoni@bootlin.com, trini@konsulko.com,
upstream+uboot@sigma-star.at
Subject: Re: [PATCH 1/4] squashfs: Fix integer overflow in sqfs_resolve_symlink()
Date: Wed, 17 Jul 2024 09:59:08 +0200 [thread overview]
Message-ID: <20240717095908.67503d3f@xps-13> (raw)
In-Reply-To: <20240712082344.8655-1-richard@nod.at>
Hi Richard,
richard@nod.at wrote on Fri, 12 Jul 2024 10:23:41 +0200:
> A carefully crafted squashfs filesystem can exhibit an inode size of 0xffffffff,
> as a consequence malloc() will do a zero allocation.
> Later in the function the inode size is again used for copying data.
> So an attacker can overwrite memory.
> Avoid the overflow by using the __builtin_add_overflow() helper.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
Good catch.
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
prev parent reply other threads:[~2024-07-17 7:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 8:23 [PATCH 1/4] squashfs: Fix integer overflow in sqfs_resolve_symlink() Richard Weinberger
2024-07-12 8:23 ` [PATCH 2/4] squashfs: Fix integer overflow in sqfs_inode_size() Richard Weinberger
2024-07-17 7:59 ` Miquel Raynal
2024-07-12 8:23 ` [PATCH 3/4] squashfs: Check sqfs_find_inode() return value Richard Weinberger
2024-07-17 8:00 ` Miquel Raynal
2024-07-12 8:23 ` [PATCH 4/4] squashfs: Fix stack overflow while symlink resolving Richard Weinberger
2024-07-17 8:06 ` Miquel Raynal
2024-07-17 8:16 ` Richard Weinberger
2024-07-17 8:26 ` Miquel Raynal
2024-07-17 8:45 ` Richard Weinberger
2024-07-17 7:59 ` Miquel Raynal [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=20240717095908.67503d3f@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=jmcosta944@gmail.com \
--cc=richard@nod.at \
--cc=thomas.petazzoni@bootlin.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=upstream+uboot@sigma-star.at \
/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