lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251012190731.GF354523@mit.edu>
Date: Sun, 12 Oct 2025 15:07:31 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Ranganath V N <vnranganath.20@...il.com>
Cc: lkp@...el.com, adilger.kernel@...ger.ca, david.hunter.linux@...il.com,
        khalid@...nel.org, linux-ext4@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org, oe-kbuild-all@...ts.linux.dev,
        skhan@...uxfoundation.org
Subject: Re: [PATCH v2] fs: ext4: fix uninitialized symbols

On Sat, Oct 11, 2025 at 12:08:29PM +0530, Ranganath V N wrote:
> Fix the issue detected by the smatch tool.
> 
> fs/ext4/inode.c:3583 ext4_map_blocks_atomic_write_slow() error: uninitialized symbol 'next_pblk'.

This one is valid, and I agree with your proposed changed.  (Although
the worst that will happen is that in case of an ENOSPC error comined
with a corrpted file system the warning message may print an
uninitialized value.  So not a big eal, but we might as well fix it.)

> fs/ext4/namei.c:1776 ext4_lookup() error: uninitialized symbol 'de'.

This is a false positive for smatch.  There isn't actualy a prolem
here, because all of these funtions are calling ext4_find_entry() or
ext4_lookup_entry(), and the callers will not try to dereference the
pointer passed into *res_dir ('de') if the function has either
returned NULL or an ERR_PTR(), and that's in fact correct.

I don't especially mind the fix (but I do wish smatch could be
smarter).  Out of curiosity, if we move the *res_dir = NULL from
__ext4_find_entry() and move it so it's unconditionally set in
ext4_find_entry() and ext4_lookup_entry(), is that sufficient to make
smatch stop complaining?

					- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ