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]
Date:	Wed, 03 Apr 2013 19:24:34 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	Sven Joachim <svenjoac@....de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	stable@...r.kernel.org, Ding Tianhong <dingtianhong@...wei.com>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Karel Srot <ksrot@...hat.com>
Subject: Re: [ 105/124] af_unix: dont send SCM_CREDENTIAL when dest socket is NULL

Andy Lutomirski <luto@...capital.net> writes:

> On Wed, Apr 3, 2013 at 5:47 PM, Eric W. Biederman <ebiederm@...ssion.com> wrote:
>>
>> No.  The patch is still bogus.
>>
>> If the problem is that we are not coallescing messages in stream_recvmsg
>> we need a different fix.
>>
>> Probably something like:
>>
>>                   if (check_creds) {
>>                           /* Never glue messages from different writers */
>>                           if ((UNIXCB(skb).pid  != siocb->scm->pid) ||
>>                               (UNIXCB(skb).cred != siocb->scm->cred))
>>                                   break;
>> -                 } else {
>> +                 } else if (test_bit(SOCK_PASSCRED, &sock->flags)) {
>>                           /* Copy credentials */
>>                           scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).cred);
>>                           check_creds = 1;
>>                   }
>
> I'm confused.  Isn't this making the problem worse, not better?

For udev that is a don't care.

For the case where we are coallescing messages this ensures we always
collaesce messages if we don't care about the credentials.  Which turns
out to be a fix for a long standing pessimization, that no on has
bother to complain about.

> With my patches, the cost should go way down and it could be made
> unconditional, but that's still probably not a good -stable change.

Reducing the cost and the complexity as far as we can is good, but we
really want small steps as we optimize the case of sending credentials.

Eric

--
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