* [PATCH] AX.25: Fix packet socket crash
@ 2005-10-04 19:48 Ralf Baechle DL5RB
2005-10-05 19:16 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ralf Baechle DL5RB @ 2005-10-04 19:48 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-hams, netdev
Since changeset 98a82febb6340466824c3a453738d4fbd05db81a AX.25 is passing
received IP and ARP packets to the stack through netif_rx() but we don't
set the skb->mac.raw to right value which may result in a crash with
applications that use a packet socket.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
net/ax25/ax25_in.c | 2 +-
net/netrom/nr_dev.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: linux-cvs/net/ax25/ax25_in.c
===================================================================
--- linux-cvs.orig/net/ax25/ax25_in.c
+++ linux-cvs/net/ax25/ax25_in.c
@@ -123,7 +123,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct
}
skb_pull(skb, 1); /* Remove PID */
- skb->h.raw = skb->data;
+ skb->mac.raw = skb->nh.raw;
skb->nh.raw = skb->data;
skb->dev = ax25->ax25_dev->dev;
skb->pkt_type = PACKET_HOST;
Index: linux-cvs/net/netrom/nr_dev.c
===================================================================
--- linux-cvs.orig/net/netrom/nr_dev.c
+++ linux-cvs/net/netrom/nr_dev.c
@@ -58,7 +58,7 @@ int nr_rx_ip(struct sk_buff *skb, struct
/* Spoof incoming device */
skb->dev = dev;
- skb->h.raw = skb->data;
+ skb->mac.raw = skb->nh.raw;
skb->nh.raw = skb->data;
skb->pkt_type = PACKET_HOST;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] AX.25: Fix packet socket crash
2005-10-04 19:48 [PATCH] AX.25: Fix packet socket crash Ralf Baechle DL5RB
@ 2005-10-05 19:16 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2005-10-05 19:16 UTC (permalink / raw)
To: ralf; +Cc: linux-hams, netdev
From: Ralf Baechle DL5RB <ralf@linux-mips.org>
Date: Tue, 4 Oct 2005 20:48:03 +0100
> Since changeset 98a82febb6340466824c3a453738d4fbd05db81a AX.25 is passing
> received IP and ARP packets to the stack through netif_rx() but we don't
> set the skb->mac.raw to right value which may result in a crash with
> applications that use a packet socket.
>
> Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Applied, thanks a lot Ralf.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-05 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-04 19:48 [PATCH] AX.25: Fix packet socket crash Ralf Baechle DL5RB
2005-10-05 19:16 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).