[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2009 10:11:59 -0200
From: Fabio Olive Leite <fabio.olive@...il.com>
To: Patroklos Argyroudis <argp@...sus-labs.com>
Cc: Chuck Lever <chuck.lever@...cle.com>,
bugzilla-daemon@...zilla.kernel.org,
bugme-daemon@...zilla.kernel.org,
Linux Network Developers <netdev@...r.kernel.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
Trond Myklebust <trond.myklebust@....uio.no>,
Neil Brown <neilb@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux NFS Mailing list <linux-nfs@...r.kernel.org>
Subject: Re: [Bugme-new] [Bug 14546] New: Off-by-two stack buffer overflow
in function rpc_uaddr2sockaddr() of net/sunrpc/addr.c
On 2009-11-11 Patroklos Argyroudis wrote:
> On Tue, Nov 10, 2009 at 06:38:05PM -0500, Chuck Lever wrote:
> > Why wouldn't you bump the size of the buffer by two as well?
> > Otherwise valid universal addresses that are RPCBIND_MAXUADDRLEN
> > bytes long will fail here.
> >
> > > memcpy(buf, uaddr, uaddr_len);
>
> There is no need to increase the size of the buffer since the new
> check (if (uaddr_len > sizeof(buf) - 2)) will terminate the function
> in case the valid universal address is RPCBIND_MAXUADDRLEN bytes.
Failing to convert a valid address is incorrect and unexpected. What
Chuck meant is that since it is valid to have an address up to
RPCBIND_MAXUADDRLEN bytes long, the function should be able to work on
that, by having an internal buffer that allows for the extra "\n\0".
Cheers,
Fábio Olivé
--
ex sed lex awk yacc, e pluribus unix, amem
na matemática das idéias, permuta é igual a adição
e um debate inteligente implementa a multiplicação
--
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