Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682690 > unrolled thread
| Started by | Thomas Garnier <thgarnie@google.com> |
|---|---|
| First post | 2017-07-06 22:40 +0200 |
| Last post | 2017-07-06 23:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v10 1/3] x86/syscalls: Check address limit on user-mode return Thomas Garnier <thgarnie@google.com> - 2017-07-06 22:40 +0200
Re: [PATCH v10 1/3] x86/syscalls: Check address limit on user-mode return Thomas Garnier <thgarnie@google.com> - 2017-07-06 23:00 +0200
Re: [PATCH v10 1/3] x86/syscalls: Check address limit on user-mode return Thomas Gleixner <tglx@linutronix.de> - 2017-07-06 23:00 +0200
| From | Thomas Garnier <thgarnie@google.com> |
|---|---|
| Date | 2017-07-06 22:40 +0200 |
| Subject | Re: [PATCH v10 1/3] x86/syscalls: Check address limit on user-mode return |
| Message-ID | <u0lJ7-2av-5@gated-at.bofh.it> |
On Wed, Jun 28, 2017 at 10:52 AM, Kees Cook <keescook@chromium.org> wrote: > > On Tue, Jun 20, 2017 at 1:24 PM, Kees Cook <keescook@chromium.org> wrote: > > On Wed, Jun 14, 2017 at 6:12 PM, Thomas Garnier <thgarnie@google.com> wrote: > >> Ensure the address limit is a user-mode segment before returning to > >> user-mode. Otherwise a process can corrupt kernel-mode memory and elevate > >> privileges [1]. > >> > >> The set_fs function sets the TIF_SETFS flag to force a slow path on > >> return. In the slow path, the address limit is checked to be USER_DS if > >> needed. > >> > >> The addr_limit_user_check function is added as a cross-architecture > >> function to check the address limit. > >> > >> [1] https://bugs.chromium.org/p/project-zero/issues/detail?id=990 > >> > >> Signed-off-by: Thomas Garnier <thgarnie@google.com> > > > > Thanks for reworking this series! > > > > The bad state correctly BUGs under the LKDTM test: > > > > [ 21.171586] lkdtm: Performing direct entry CORRUPT_USER_DS > > [ 21.172791] lkdtm: setting bad task size limit > > [ 21.173742] ------------[ cut here ]------------ > > [ 21.174641] kernel BUG at ./include/linux/syscalls.h:220! > > ... > > [ 21.193166] Call Trace: > > [ 21.193617] ? trace_hardirqs_on_thunk+0x1a/0x1c > > [ 21.194443] entry_SYSCALL64_slow_path+0x25/0x25 > > > > > > Tested-by: Kees Cook <keescook@chromium.org> > > Is everyone happy with this patch for x86? Does this need anything > more/different? Asking again. Additional feedback? Anyone wants to pick-it up? > > Thanks! > > -Kees > > -- > Kees Cook > Pixel Security -- Thomas
[toc] | [next] | [standalone]
| From | Thomas Garnier <thgarnie@google.com> |
|---|---|
| Date | 2017-07-06 23:00 +0200 |
| Message-ID | <u0m2t-2hh-15@gated-at.bofh.it> |
| In reply to | #1682690 |
On Thu, Jul 6, 2017 at 1:48 PM, Thomas Gleixner <tglx@linutronix.de> wrote: > On Thu, 6 Jul 2017, Thomas Garnier wrote: >> On Wed, Jun 28, 2017 at 10:52 AM, Kees Cook <keescook@chromium.org> wrote: >> > >> > On Tue, Jun 20, 2017 at 1:24 PM, Kees Cook <keescook@chromium.org> wrote: >> > > On Wed, Jun 14, 2017 at 6:12 PM, Thomas Garnier <thgarnie@google.com> wrote: >> > >> Ensure the address limit is a user-mode segment before returning to >> > >> user-mode. Otherwise a process can corrupt kernel-mode memory and elevate >> > >> privileges [1]. >> > >> >> > >> The set_fs function sets the TIF_SETFS flag to force a slow path on >> > >> return. In the slow path, the address limit is checked to be USER_DS if >> > >> needed. >> > >> >> > >> The addr_limit_user_check function is added as a cross-architecture >> > >> function to check the address limit. >> > >> >> > >> [1] https://bugs.chromium.org/p/project-zero/issues/detail?id=990 >> > >> >> > >> Signed-off-by: Thomas Garnier <thgarnie@google.com> >> > > >> > > Thanks for reworking this series! >> > > >> > > The bad state correctly BUGs under the LKDTM test: >> > > >> > > [ 21.171586] lkdtm: Performing direct entry CORRUPT_USER_DS >> > > [ 21.172791] lkdtm: setting bad task size limit >> > > [ 21.173742] ------------[ cut here ]------------ >> > > [ 21.174641] kernel BUG at ./include/linux/syscalls.h:220! >> > > ... >> > > [ 21.193166] Call Trace: >> > > [ 21.193617] ? trace_hardirqs_on_thunk+0x1a/0x1c >> > > [ 21.194443] entry_SYSCALL64_slow_path+0x25/0x25 >> > > >> > > >> > > Tested-by: Kees Cook <keescook@chromium.org> >> > >> > Is everyone happy with this patch for x86? Does this need anything >> > more/different? >> >> Asking again. Additional feedback? Anyone wants to pick-it up? > > Can do. This needs to be a combo of all 3 I assume as the x86 one contains > the function used by all of them, right? That is correct. > > Thanks, > > tglx -- Thomas
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2017-07-06 23:00 +0200 |
| Subject | Re: [PATCH v10 1/3] x86/syscalls: Check address limit on user-mode return |
| Message-ID | <u0m2t-2hh-17@gated-at.bofh.it> |
| In reply to | #1682690 |
On Thu, 6 Jul 2017, Thomas Garnier wrote: > On Wed, Jun 28, 2017 at 10:52 AM, Kees Cook <keescook@chromium.org> wrote: > > > > On Tue, Jun 20, 2017 at 1:24 PM, Kees Cook <keescook@chromium.org> wrote: > > > On Wed, Jun 14, 2017 at 6:12 PM, Thomas Garnier <thgarnie@google.com> wrote: > > >> Ensure the address limit is a user-mode segment before returning to > > >> user-mode. Otherwise a process can corrupt kernel-mode memory and elevate > > >> privileges [1]. > > >> > > >> The set_fs function sets the TIF_SETFS flag to force a slow path on > > >> return. In the slow path, the address limit is checked to be USER_DS if > > >> needed. > > >> > > >> The addr_limit_user_check function is added as a cross-architecture > > >> function to check the address limit. > > >> > > >> [1] https://bugs.chromium.org/p/project-zero/issues/detail?id=990 > > >> > > >> Signed-off-by: Thomas Garnier <thgarnie@google.com> > > > > > > Thanks for reworking this series! > > > > > > The bad state correctly BUGs under the LKDTM test: > > > > > > [ 21.171586] lkdtm: Performing direct entry CORRUPT_USER_DS > > > [ 21.172791] lkdtm: setting bad task size limit > > > [ 21.173742] ------------[ cut here ]------------ > > > [ 21.174641] kernel BUG at ./include/linux/syscalls.h:220! > > > ... > > > [ 21.193166] Call Trace: > > > [ 21.193617] ? trace_hardirqs_on_thunk+0x1a/0x1c > > > [ 21.194443] entry_SYSCALL64_slow_path+0x25/0x25 > > > > > > > > > Tested-by: Kees Cook <keescook@chromium.org> > > > > Is everyone happy with this patch for x86? Does this need anything > > more/different? > > Asking again. Additional feedback? Anyone wants to pick-it up? Can do. This needs to be a combo of all 3 I assume as the x86 one contains the function used by all of them, right? Thanks, tglx
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web