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:	Thu, 15 Oct 2009 08:07:21 +0100
From:	David Howells <dhowells@...hat.com>
To:	graff yang <graff.yang@...il.com>
Cc:	dhowells@...hat.com, linux-kernel@...r.kernel.org,
	gyang@...ckfin.uclinux.org, akpm@...ux-foundation.org,
	uclinux-dist-devel@...ckfin.uclinux.org,
	Graff Yang <graf.yang@...log.com>,
	linux-security-module@...r.kernel.org
Subject: Re: [PATCH] mm/nommu.c: Fix improperly call of security API in mmap

graff yang <graff.yang@...il.com> wrote:

> Your patch works both with SELINUX enabled or disabled.

Thanks.

> But, how to prevent the address that attempting to be mapped to be lower
> than CONFIG_LSM_MMAP_MIN_ADDR/CONFIG_DEFAULT_MMAP_MIN_ADDR?
> This is what the security_file_mmap() is doing and mmu's
> do_mmap_pgoff() has implemented.

You need to ask yourself two questions:

 (1) Does the test make any sense in the NOMMU context?  Given that the
     userspace program _cannot_ specify that something should be mapped below
     that address (since MAP_FIXED gives an error and the hint is ignored),
     I'd say not.

 (2) Is it likely that LSM security would be used with NOMMU anyway, given
     that there is nothing stopping userspace programs editing the kernel
     directly?

You need to show that it makes sense to do the test in a NOMMU context.
Remember, if there is no physical medium at address 0 (RAM, flash, whatever),
you can't map anything there.  This might best be left to the arch to not
provide page 0 of RAM to the page allocator during memory initialisation.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ