Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 May 2017 14:11:19 +0100
From: David Howells <dhowells@...hat.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: dhowells@...hat.com, netdev@...r.kernel.org,
    linux-kernel@...r.kernel.org, davem@...emloft.net,
    kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH v8 3/5] rxrpc: check return value of skb_to_sgvec always

Jason A. Donenfeld <Jason@...c4.com> wrote:

> +	if (unlikely(skb_to_sgvec(skb, sg, offset, 8) < 0))
> +		goto nomem;
> ...
> +	if (unlikely(skb_to_sgvec(skb, sg, offset, len) < 0)) {
> +		if (sg != _sg)
> +			kfree(sg);
> +		goto nomem;

skb_to_sgvec() can return -EMSGSIZE in some circumstances.  You shouldn't
return -ENOMEM here in such a case.

David

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.