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: <CALCETrW2RbX928+TA6YWENNKAx+KY0bjTPHdk72QmPiwphJ1BQ@mail.gmail.com>
Date:	Fri, 3 Jul 2015 09:57:52 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Marcin Niesluchowski <m.niesluchow@...sung.com>
Cc:	Richard Weinberger <richard.weinberger@...il.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"open list:ABI/API" <linux-api@...r.kernel.org>,
	Jonathan Corbet <corbet@....net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Petr Mladek <pmladek@...e.cz>, Tejun Heo <tj@...nel.org>,
	Kay Sievers <kay@...y.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Joe Perches <joe@...ches.com>,
	Karol Lewandowski <k.lewandowsk@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: Re: [RFC 0/8] Additional kmsg devices

On Fri, Jul 3, 2015 at 8:09 AM, Marcin Niesluchowski
<m.niesluchow@...sung.com> wrote:
>
> * Message credibility: Lets imagine simple service which collects logs via
> unix sockets. There is no reliable way of identifying logging process.
> getsockopt() with SO_PEERCRED option would give pid form cred structure, but
> according to manual it may not be of actual logging process:
>   "The returned credentials are those that were in effect at the time of the
> call to connect(2) or socketpair(2)."
>       - select(7)

There's SCM_CREDENTIALS, which is dangerous, but it's dangerous in
exactly the same way that your patches are dangerous.  You're
collecting PID/TID when write(2) is called, and it's very easy to get
another process to call write(2) on your behalf, because write(2)
isn't supposed to collect credentials.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ