Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 18 Aug 2020 04:34:18 +0200
From: Jann Horn <jannh@...gle.com>
To: Kernel Hardening <kernel-hardening@...ts.openwall.com>, Kees Cook <keescook@...omium.org>
Subject: usercopy arch_within_stack_frames() is a no-op in almost all modern
 kernel configurations

I was looking at some usercopy stuff and noticed that
arch_within_stack_frames() (the helper used by the usercopy
bounds-checking logic to detect copies that cross stack frames) seems
to be a no-op on almost all modern kernel configurations.

It is only defined for x86 - no implementation for e.g. arm64 exists
at all. The x86 version requires CONFIG_FRAME_POINTER, which is only
selected by CONFIG_UNWINDER_FRAME_POINTER (whereas the more modern
choice, and default, for x86-64 is CONFIG_UNWINDER_ORC).

Personally, I don't feel very attached to that check; but if people
are interested in keeping it, it should probably be reworked to use
the proper x86 unwinder API: unwind_start(), unwind_next_frame(),
unwind_get_return_address_ptr() and unwind_done() together would
probably help with this. Otherwise, it should probably be removed,
since in that case it's pretty much going to just be bitrot?

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.