Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1297058
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 1/7] mm/slab_common.c: Add common support for slab saniziation |
| Date | 2015-12-22 21:50 +0100 |
| Message-ID | <qIC2B-hq-5@gated-at.bofh.it> (permalink) |
| References | <qIm7v-75a-1@gated-at.bofh.it> <qIm7w-75a-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 22.12.2015 4:40, Laura Abbott wrote:
> Each of the different allocators (SLAB/SLUB/SLOB) handles
> clearing of objects differently depending on configuration.
> Add common infrastructure for selecting sanitization levels
> (off, slow path only, partial, full) and marking caches as
> appropriate.
>
> All credit for the original work should be given to Brad Spengler and
> the PaX Team.
>
> Signed-off-by: Laura Abbott <laura@labbott.name>
>
> +#ifdef CONFIG_SLAB_MEMORY_SANITIZE
> +#ifdef CONFIG_X86_64
> +#define SLAB_MEMORY_SANITIZE_VALUE '\xfe'
> +#else
> +#define SLAB_MEMORY_SANITIZE_VALUE '\xff'
> +#endif
> +enum slab_sanitize_mode {
> + /* No sanitization */
> + SLAB_SANITIZE_OFF = 0,
> +
> + /* Partial sanitization happens only on the slow path */
> + SLAB_SANITIZE_PARTIAL_SLOWPATH = 1,
Can you explain more about this variant? I wonder who might find it useful
except someone getting a false sense of security, but cheaper.
It sounds like wanting the cake and eat it too :)
I would be surprised if such IMHO half-solution existed in the original
PAX_MEMORY_SANITIZE too?
Or is there something that guarantees that the objects freed on hotpath won't
stay there for long so the danger of leak is low? (And what about
use-after-free?) It depends on further slab activity, no? (I'm not that familiar
with SLUB, but I would expect the hotpath there being similar to SLAB freeing
the object on per-cpu array_cache. But, it seems the PARTIAL_SLOWPATH is not
implemented for SLAB, so there might be some fundamental difference I'm missing.)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 0/7] Sanitization of slabs based on grsecurity/PaX Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
[RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Mathias Krause <minipli@googlemail.com> - 2015-12-22 10:40 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 19:00 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Mathias Krause <minipli@googlemail.com> - 2015-12-22 19:40 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 20:20 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Christoph Lameter <cl@linux.com> - 2015-12-22 21:10 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Mathias Krause <minipli@googlemail.com> - 2015-12-22 21:10 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Dave Hansen <dave.hansen@intel.com> - 2015-12-22 16:00 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Christoph Lameter <cl@linux.com> - 2015-12-22 17:30 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Dave Hansen <dave.hansen@intel.com> - 2015-12-22 18:30 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Christoph Lameter <cl@linux.com> - 2015-12-22 19:10 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Dave Hansen <dave.hansen@intel.com> - 2015-12-22 19:20 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 20:20 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Dave Hansen <dave.hansen@intel.com> - 2015-12-22 20:40 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Christoph Lameter <cl@linux.com> - 2015-12-22 18:30 +0100
Re: [kernel-hardening] [RFC][PATCH 6/7] mm: Add Kconfig option for slab sanitization Dave Hansen <dave.hansen@intel.com> - 2015-12-22 18:30 +0100
[RFC][PATCH 4/7] slob: Add support for sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
[RFC][PATCH 3/7] slab: Add support for sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
[RFC][PATCH 7/7] lkdtm: Add READ_AFTER_FREE test Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
[RFC][PATCH 5/7] mm: Mark several cases as SLAB_NO_SANITIZE Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
[RFC][PATCH 1/7] mm/slab_common.c: Add common support for slab saniziation Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
Re: [RFC][PATCH 1/7] mm/slab_common.c: Add common support for slab saniziation Vlastimil Babka <vbabka@suse.cz> - 2015-12-22 21:50 +0100
[RFC][PATCH 2/7] slub: Add support for sanitization Laura Abbott <laura@labbott.name> - 2015-12-22 04:50 +0100
Re: [RFC][PATCH 0/7] Sanitization of slabs based on grsecurity/PaX Christoph Lameter <cl@linux.com> - 2015-12-22 17:10 +0100
Re: [kernel-hardening] Re: [RFC][PATCH 0/7] Sanitization of slabs based on grsecurity/PaX Dave Hansen <dave.hansen@intel.com> - 2015-12-22 17:20 +0100
Re: [kernel-hardening] Re: [RFC][PATCH 0/7] Sanitization of slabs based on grsecurity/PaX Daniel Micay <danielmicay@gmail.com> - 2015-12-22 17:40 +0100
Re: [RFC][PATCH 0/7] Sanitization of slabs based on grsecurity/PaX Laura Abbott <laura@labbott.name> - 2015-12-22 21:10 +0100
csiph-web