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: <a33df3aa-7f37-4d1b-bde8-642115dd1441@redhat.com>
Date: Thu, 3 Apr 2025 22:59:12 +0200
From: David Hildenbrand <david@...hat.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: kernel test robot <lkp@...el.com>, oe-kbuild@...ts.linux.dev,
 Dan Carpenter <error27@...il.com>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, "Liam R. Howlett" <Liam.Howlett@...cle.com>,
 x86@...nel.org
Subject: Re: [PATCH v3] x86/mm/pat: Fix VM_PAT handling when fork() fails in
 copy_page_range()

On 03.04.25 17:14, Dan Carpenter wrote:
> Sorry, I've been having trouble with my email recently...  I replied
> earlier but my email got eaten on the way out.
> 
> What happened here is that the zero day bot emails go to me first and
> then I review them or forward them depending on if they're a real
> issue or not.
> 
> Here it's a false postive because it's set and used if the
> (src_vma->vm_flags & VM_PFNMAP) flag is set.  Smatch doesn't parse
> this correctly.  I've been meaning to fix this in Smatch for a
> while.

There is a slight complication (on top of the VM_PFNMAP checks):

If "src_vma->vm_flags & VM_PAT" we
* set pfn
* set dst_vma->vm_flags |= VM_PFNMAP

Then, we only consume the pfn if "dst_vma->vm_flags & VM_PFNMAP"

While we won't be using the uninitialized pfn (good), we'd still pass an 
uninitialized pfn, which IIRC is UB; likely nothing happens on GCC 
clang, but we better handle it.

So that should better be changed; I'll send a fix.

Thanks!

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ