GNU bug report logs - #79336
[PATCH] df: fix potential null pointer dereference

Previous Next

Package: coreutils;

Reported by: yubiao hu <huyubiaox <at> gmail.com>

Date: Fri, 29 Aug 2025 01:47:02 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Full log


Message #13 received at 79336-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: yubiao hu <huyubiaox <at> gmail.com>, 79336-done <at> debbugs.gnu.org
Subject: Re: bug#79336: [PATCH] df: fix potential null pointer dereference
Date: Sat, 30 Aug 2025 18:52:40 +0100
[Message part 1 (text/plain, inline)]
On 29/08/2025 02:45, yubiao hu wrote:
> * src/df.c (get_dev): Fix potential null pointer dereference
> - Avoid dereferencing stat_file when both device and
>   mount_point are NULL
> - Handle allocation failure for cell when mount_point
>   is NULL

These are valid concerns.
I also see potential null dereferences of device.
The attached patch takes a different approach
by ensuring arguments are initialized earlier.

Marking this as done.

Will push the attached later.

cheers,
Padraig
[df-null-pointers.patch (text/x-patch, attachment)]

This bug report was last modified 9 days ago.

Previous Next


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