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: <ZxJk3RYDTpYkELCa@PC2K9PVX.TheFacebook.com>
Date: Fri, 18 Oct 2024 09:38:37 -0400
From: Gregory Price <gourry@...rry.net>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, bhelgaas@...gle.com,
	ilpo.jarvinen@...ux.intel.com, mika.westerberg@...ux.intel.com,
	ying.huang@...el.com, bhe@...hat.com, tglx@...utronix.de,
	takahiro.akashi@...aro.org, stable@...r.kernel.org
Subject: Re: [PATCH] resource,kexec: walk_system_ram_res_rev must retain
 resource flags

On Fri, Oct 18, 2024 at 03:57:30PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 17, 2024 at 03:03:47PM -0400, Gregory Price wrote:
> > walk_system_ram_res_rev() erroneously discards resource flags when
> > passing the information to the callback.
> > 
> > This causes systems with IORESOURCE_SYSRAM_DRIVER_MANAGED memory to
> > have these resources selected during kexec to store kexec buffers
> > if that memory happens to be at placed above normal system ram.
> > 
> > This leads to undefined behavior after reboot. If the kexec buffer
> > is never touched, nothing happens. If the kexec buffer is touched,
> > it could lead to a crash (like below) or undefined behavior.
> > 
> > Tested on a system with CXL memory expanders with driver managed
> > memory, TPM enabled, and CONFIG_IMA_KEXEC=y. Adding printk's
> > showed the flags were being discarded and as a result the check
> > for IORESOURCE_SYSRAM_DRIVER_MANAGED passes.
> > 
> > find_next_iomem_res: name(System RAM (kmem))
> > 		     start(10000000000)
> > 		     end(1034fffffff)
> > 		     flags(83000200)
> > 
> > locate_mem_hole_top_down: start(10000000000) end(1034fffffff) flags(0)
> > 
> > [.] BUG: unable to handle page fault for address: ffff89834ffff000
> 
> Please, cut this down to only important ~3-5 lines as suggested in
> the Submitting Patches documentation.
> 
> Yeah, I see that Andrew applied it to hist testing branch, if it's not going to
> be updated there, consider above as a hint for the future contributions with
> backtraces.
>

noted, thank you!
 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ