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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOUHufaFz=G+0o5c+u9YY-4n1KExS6_tOFATY1TMyWWcrAQ8Ng@mail.gmail.com>
Date: Tue, 25 Mar 2025 14:35:53 -0600
From: Yu Zhao <yuzhao@...gle.com>
To: Purva Yeshi <purvayeshi550@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/vmscan: Initialize dirty to prevent uninitialized use

On Tue, Mar 25, 2025 at 1:49 PM Purva Yeshi <purvayeshi550@...il.com> wrote:
>
> Fix Smatch-detected error:
> mm/vmscan.c:3509 walk_pte_range() error: uninitialized symbol 'dirty'.
> mm/vmscan.c:3522 walk_pte_range() error: uninitialized symbol 'dirty'.
> mm/vmscan.c:3600 walk_pmd_range_locked() error: uninitialized symbol 'dirty'.
> mm/vmscan.c:3614 walk_pmd_range_locked() error: uninitialized symbol 'dirty'.
> mm/vmscan.c:4220 lru_gen_look_around() error: uninitialized symbol 'dirty'.
> mm/vmscan.c:4232 lru_gen_look_around() error: uninitialized symbol 'dirty'.
>
> Smatch reports 'dirty' as uninitialized, leading to potential
> undefined behavior.

Thanks -- this seems like false positives from Smatch, where the
problem should be fixed.

> Explicitly initialize dirty to 0 in walk_pte_range(),
> walk_pmd_range_locked(), and lru_gen_look_around() in mm/vmscan.c
> to fix Smatch error.
>
> Signed-off-by: Purva Yeshi <purvayeshi550@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ