develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122657] t/io/socket.t failing on hurd: peer from recv()should be empty or the remote name

Thread Previous | Thread Next
From:
Svante Signell
Date:
September 28, 2014 20:52
Subject:
Re: [perl #122657] t/io/socket.t failing on hurd: peer from recv()should be empty or the remote name
Message ID:
1411937519.3899.2.camel@gmail.com
On Sat, 2014-09-27 at 07:02 -0700, Leon Timmermans via RT wrote:
> On Sat, Sep 27, 2014 at 11:24 AM, Svante Signell <svante.signell@gmail.com>
> wrote:

> > As seen above you are comparing padding bytes, and that content is not
> > defined by any standard. You should decode sin_len from getpeername and
> > then compare only that many bytes as given by it.
> 
> 
> That's exactly what we're doing right now.

You were right, there was a bug in the Linux code borrowed for the
network, see below. Samuel had problems delivering this message
therefore I'm replying. In case it got through, just ignore this
message.

Thank you for your time,
"the middle man"

> Hello,
> 
> Samuel Thibault wrote:
> > > I don't know how $recv_peer happened to contain so many bytes, but
> it's not
> > > supposed to contain so many, but just 16, as advertised by sin_len
> 
> Oops, sorry.  I was in a hurry when answering that, and miscounted the
> printed
> bytes.
> 
> Father Chrysostomos wrote:
> > And quite frankly, I'd worry more about what data Hurd is leaking…
> 
> Indeed.  It seems it's a bug which was present in the Linux code that
> we have
> borrowed into the Hurd stack.  I have thus backported the fix, and the
> padding
> is now zero instead of stack leak.  It has actually let me find a
> potential
> issue in the Linux source code in the SO_PEERNAME code :)
> 
> Samuel


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About