GNU bug report logs - #76648
Crash trying to parse nilfs2 superblock

Previous Next

Package: parted;

Reported by: "Butenko, Anton" <abutenko <at> akamai.com>

Date: Fri, 28 Feb 2025 17:37:03 UTC

Severity: normal

Done: "Brian C. Lane" <bcl <at> redhat.com>

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Butenko, Anton" <abutenko <at> akamai.com>
To: "bug-parted <at> gnu.org" <bug-parted <at> gnu.org>
Subject: Crash trying to parse nilfs2 superblock
Date: Fri, 28 Feb 2025 15:21:00 +0000
[Message part 1 (text/plain, inline)]
Hello,

I was checking how good is fix of

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34392
“Avoid sigsegv in case 2nd nilfs2 superblock magic accidently found.”

In systemd, libblkid and parted and found a slight possibility of crash in parted regarding to the changes in the referred bug.
The parted fix includes a chance to crash in case of nilfs2 superblock having correct magic, but corrupted “bytes” field (value in range from 12 to 20).

I’ve modified the code to avoid the sigsegv and align implementation with the libblkid implementation:
https://github.com/util-linux/util-linux/commit/ac681a310c32319423297544833932f4d689a7a2
And modified t4301-nilfs2-badsb2.sh test code to trigger this case as well as the previously reported one.

I've attached a patch with my modifications. Can you, please, look at it?

Regards,
Anton Butenko
[Message part 2 (text/html, inline)]

This bug report was last modified 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.