Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705882
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [kernel-hardening] [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages |
| Date | 2017-08-07 23:50 +0200 |
| Message-ID | <ubY4q-6ew-9@gated-at.bofh.it> (permalink) |
| References | <ubWYG-5rz-19@gated-at.bofh.it> <ubXL3-62i-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 7, 2017 at 2:27 PM, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: > On 7 August 2017 at 21:39, Kees Cook <keescook@chromium.org> wrote: >> Two new tests STACK_GUARD_PAGE_LEADING and STACK_GUARD_PAGE_TRAILING >> attempt to read the byte before and after, respectively, of the current >> stack frame, which should fault under VMAP_STACK. >> >> Signed-off-by: Kees Cook <keescook@chromium.org> >> --- >> Do these tests both trip with the new arm64 VMAP_STACK code? > > Probably not. On arm64, the registers are stacked by software at > exception entry, and so we decrement the sp first by the size of the > register file, and if the resulting value overflows the stack, the > situation is handled as if the exception was caused by a faulting > stack access while it may be caused by something else in reality. > Since the act of handling the exception is guaranteed to overflow the > stack anyway, this does not really make a huge difference, and it > prevents the recursive fault from wiping the context that we need to > produce the diagnostics. > > This means an illegal access right above the stack will go undetected. I thought vmap entries provided guard pages around allocations? Shouldn't that catch it? -- Kees Cook Pixel Security
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Kees Cook <keescook@chromium.org> - 2017-08-07 22:40 +0200
Re: [kernel-hardening] [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-07 23:30 +0200
Re: [kernel-hardening] [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Kees Cook <keescook@chromium.org> - 2017-08-07 23:50 +0200
Re: [kernel-hardening] [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Kees Cook <keescook@chromium.org> - 2017-08-07 23:50 +0200
Re: [kernel-hardening] [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-07 23:50 +0200
Re: [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Mark Rutland <mark.rutland@arm.com> - 2017-08-08 00:10 +0200
Re: [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Laura Abbott <labbott@redhat.com> - 2017-08-08 01:00 +0200
Re: [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Kees Cook <keescook@chromium.org> - 2017-08-08 01:40 +0200
Re: [PATCH] lkdtm: Test VMAP_STACK allocates leading/trailing guard pages Mark Rutland <mark.rutland@arm.com> - 2017-08-08 11:30 +0200
csiph-web