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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Mar 2013 13:12:32 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	dingtianhong@...wei.com, edumazet@...gle.com,
	netdev@...r.kernel.org, lizefan@...wei.com, huxinwei@...wei.com
Subject: Re: [Eulerkernel] [PATCH] af_unix: dont send SCM_CREDENTIAL when
 dest socket is NULL

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Mon, 25 Mar 2013 07:04:29 -0700

> On Mon, 2013-03-25 at 18:28 +0800, dingtianhong wrote:
>> SCM_SCREDENTIALS should apply to write() syscalls only either source or destination
>> socket asserted SOCK_PASSCRED. The original implememtation in maybe_add_creds is wrong,
>> and breaks several LSB testcases ( i.e. /tset/LSB.os/netowkr/recvfrom/T.recvfrom).
>> 
>> Origionally-authored-by: Karel Srot <ksrot@...hat.com>
>> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
>> ---
>>    net/unix/af_unix.c | 4 ++--
>>    1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
>> index 51be64f..99189fd 100644
>> --- a/net/unix/af_unix.c
>> +++ b/net/unix/af_unix.c
>> @@ -1413,8 +1413,8 @@ static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
>>           if (UNIXCB(skb).cred)
>>                   return;
>>           if (test_bit(SOCK_PASSCRED, &sock->flags) ||
>> -           !other->sk_socket ||
>> -           test_bit(SOCK_PASSCRED, &other->sk_socket->flags)) {
>> +           (other->sk_socket &&
>> +           test_bit(SOCK_PASSCRED, &other->sk_socket->flags))) {
>>                   UNIXCB(skb).pid  = get_pid(task_tgid(current));
>>                   UNIXCB(skb).cred = get_current_cred();
>>           }
> 
> I am not sure why adding credentials if other->sk_socket is NULL could
> break an application ?
> 
> This was the case before commit introducing this code.
> 
> Anyway patch looks fine
> 
> Acked-by: Eric Dumazet <edumazet@...gle.com>

This patch is massively whitespace damaged, and therefore completely
unusable.

Please fix this, and only resubmit this patch when you can successfully
email the patch to yourself and apply it successfully.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ