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: <20080323.215641.192753003.davem@davemloft.net>
Date:	Sun, 23 Mar 2008 21:56:41 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	samuel.thibault@...-lyon.org
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH,TRIVIAL] AF_UNIX, accept() and addrlen

From: Samuel Thibault <samuel.thibault@...-lyon.org>
Date: Sat, 8 Mar 2008 02:23:21 +0000

> Accept and getpeername are supposed to return the amount of bytes
> written in the returned address.  However, on unnamed sockets, only
> sizeof(short) is returned, while a 0 is put in the sun_path member.
> This patch adds 1 for that additional byte.
> 
> Signed-off-by: Samuel Thibault <samuel.thibault@...-lyon.org>

This change isn't correct.  It's the fact that the
length returned is sizeof(short) that tells the caller
that the unix socket is unnamed.

We zero out the sun_path[0] member just to be polite
and tidy.

You would break applications if you changed this, so
marking this patch as "trivial" is extremely premature.
--
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