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]
Message-ID: <CALCETrXLnZpt8Uu8WXX0BhTDD2Vno=gF4xSPAO6DXzqxE+XwAg@mail.gmail.com>
Date:	Fri, 17 Jun 2016 11:55:32 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	James Morris <jmorris@...ei.org>
Cc:	Kees Cook <keescook@...omium.org>,
	LSM List <linux-security-module@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andy Lutomirski <luto@...nel.org>
Subject: Re: [PULL] seccomp update (next)

On Fri, Jun 17, 2016 at 12:15 AM, James Morris <jmorris@...ei.org> wrote:
> On Tue, 14 Jun 2016, Kees Cook wrote:
>
>> Hi,
>>
>> Please pull these seccomp changes for next. These have been tested by
>> myself and Andy, and close a long-standing issue with seccomp where tracers
>> could change the syscall out from under seccomp.
>
> Pulled to security -next.

As a heads up: I think this doesn't quite close the hole on x86.  Consider:

64-bit task arranges to be traced by a 32-bit task (or presumably a
64-bit task that calls ptrace via int80).

Tracer does PTRACE_SYSCALL.

Tracee does a normal syscall.

Tracer writes tracee's orig_ax, thus invoking this thing in
arch/x86/kernel/ptrace.c:

        if (syscall_get_nr(child, regs) >= 0)
            child->thread.status |= TS_COMPAT;

Tracer resumes and gets confused.

I think the right fix is to just delete:

        if (syscall_get_nr(child, regs) >= 0)
            child->thread.status |= TS_COMPAT;

from ptrace.c.   The comment above it is garbage, too.

--Andy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ