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]
Date:   Wed, 11 Aug 2021 10:20:28 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Konrad Rzeszutek Wilk <konrad@...nok.org>,
        Maurizio Lombardi <mlombard@...hat.com>, bp@...en8.de,
        tglx@...utronix.de, x86@...nel.org, pjones@...hat.com,
        konrad@...nel.org, george.kennedy@...cle.com, rafael@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3] iscsi_ibft: fix crash due to KASLR physical memory
 remapping

On Wed, Aug 11, 2021 at 07:57:25AM +0100, Christoph Hellwig wrote:
> On Tue, Aug 10, 2021 at 01:55:11PM -0400, Konrad Rzeszutek Wilk wrote:
> > On Tue, Aug 10, 2021 at 06:00:24PM +0100, Christoph Hellwig wrote:
> > > > Fix this bug by saving the address of the physical location
> > > > of the ibft; later the driver will use isa_bus_to_virt() to get
> > > > the correct virtual address.
> > > 
> > > That sound rather broken.  Why not save the physical address in
> > > find_ibft_region and then later ioremap that when a virtual address is
> > > needed like all other code accessing magic I/O memory?
> > 
> > That is kind of what he does. The physical address is saved as a global
> > static variable and also the physical address is memreserved. Then
> > later on the physical address is used to create the virtual address.
> 
> Except that it uses isa_bus_to_virt, which is really broken.
> 
> > Or are you thinking of making the find_ibft_region reserve the physical
> > address, and _cache_ the physical address so there is no global
> > variable ?
> 
> No.  Just switch to ioremap/early_ioremap insted of this isa_bus_to_virt
> mess.

Why ioremap? This is not IO memory, plain phys_to_virt should be fine here.

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ