Subject: bug#76648: closed (Re: bug#76648: Crash trying to parse nilfs2 superblock)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 28 May 2025 20:55:02 +0000

Your bug report

#76648: Crash trying to parse nilfs2 superblock

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
76648: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76648
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#76648: Crash trying to parse nilfs2 superblock
From: "Brian C. Lane" <[email-masked]>
To: "Butenko, Anton" <[email-masked]>
Cc: [email-masked]
Date: Wed, 28 May 2025 13:54:40 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On Fri, Feb 28, 2025 at 03:21:00PM +0000, Butenko, Anton via Bug reports for the GNU Parted disk partition editor wrote:
> 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?

Sorry it took so long to look at this, it looks good to me. I'm posting
it to the parted-devel list and if there are no objections I'll push it
by Friday.

Thanks,

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart

Subject: Crash trying to parse nilfs2 superblock
From: "Butenko, Anton" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 28 Feb 2025 15:21:00 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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