[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YRKUyu4F2f2rQTXc@mit.edu>
Date: Tue, 10 Aug 2021 11:01:30 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Lukas Czerner <lczerner@...hat.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 3/7] e2fsprogs: fix unexpected NULL variable
On Fri, Aug 06, 2021 at 11:58:16AM +0200, Lukas Czerner wrote:
> The ext2fs_check_mount_point() function can be called with mtpt being
> NULL as for example from ext2fs_check_if_mounted(). However in the
> is_swap_device condition we use the mtpt in strncpy without checking
> whether it is non-null first.
>
> This should not be a problem on linux since the previous attempt to open
> the device exclusively would have prevented us from ever reaching the
> problematic strncpy. However it's still a bug and can cause problems on
> other systems, fix it by conditioning strncpy on mtpt not being null.
>
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
Applied, thanks.
- Ted
Powered by blists - more mailing lists