diff mbox

[net-next,01/15] ipv4: Fix ip_local_out_sk by passing the sk into __ip_local_out_sk

Message ID 1444157595-28816-1-git-send-email-ebiederm@xmission.com
State Changes Requested
Delegated to: Pablo Neira
Headers show

Commit Message

Eric W. Biederman Oct. 6, 2015, 6:53 p.m. UTC
In the rare case where sk != skb->sk ip_local_out_sk arranges
to call dst->output differently if the skb is queued or not.
This is a bug.

Fix this bug by passing the sk parameter of ip_local_out_sk through
from ip_local_out_sk to __ip_local_out_sk (skipping __ip_local_out).

Fixes: 7026b1ddb6b8d4e6ee33dc2bd06c0ca8746fa7ab
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 net/ipv4/ip_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergei Shtylyov Oct. 7, 2015, 1:37 p.m. UTC | #1
Hello.

On 10/6/2015 9:53 PM, Eric W. Biederman wrote:

> In the rare case where sk != skb->sk ip_local_out_sk arranges
> to call dst->output differently if the skb is queued or not.
> This is a bug.
>
> Fix this bug by passing the sk parameter of ip_local_out_sk through
> from ip_local_out_sk to __ip_local_out_sk (skipping __ip_local_out).
>
> Fixes: 7026b1ddb6b8d4e6ee33dc2bd06c0ca8746fa7ab

    Please see Documentation/SubmittingPatches on how the Fixes tag should 
look like.

> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nicolas Dichtel Oct. 7, 2015, 2:48 p.m. UTC | #2
Le 06/10/2015 20:53, Eric W. Biederman a écrit :
> In the rare case where sk != skb->sk ip_local_out_sk arranges
> to call dst->output differently if the skb is queued or not.
> This is a bug.
>
> Fix this bug by passing the sk parameter of ip_local_out_sk through
> from ip_local_out_sk to __ip_local_out_sk (skipping __ip_local_out).
>
> Fixes: 7026b1ddb6b8d4e6ee33dc2bd06c0ca8746fa7ab
Fixes: 7026b1ddb6b8 ("netfilter: Pass socket pointer down through okfn().")

It's in 4.1, so I assume this patch is for net also?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 911ea739049a..6cb585a05dd1 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -117,7 +117,7 @@  int ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
 {
 	int err;
 
-	err = __ip_local_out(skb);
+	err = __ip_local_out_sk(sk, skb);
 	if (likely(err == 1))
 		err = dst_output(sk, skb);