* [PATCH 3/6]NET:AX25:ROSE Traps calls to rose_route_frame with a NULL ax25 callback
@ 2016-07-16 9:43 Richard Stearn
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stearn @ 2016-07-16 9:43 UTC (permalink / raw)
To: netdev, linux-hams
Subject: [PATCH 3/6]NET:AX25:ROSE Traps calls to rose_route_frame with a NULL ax25 callback
Traps calls to rose_route_frame with a NULL ax25 callback to
prevent a kernel crash.
Calling rose_route_frame with a NULL ax25 callback parameter indicates a
locally generated frame. The existing code does not handle the NULL value
and the kernel hard crashes in an interrupt, resulting in the system stopping
processing.
Signed-off-by: Richard Stearn <richard@rns-stearn.demon.co.uk>
---
net/rose/rose_route.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 23e0fbd..96ed06c 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -877,6 +877,11 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
src_addr = (rose_address *)(skb->data + ROSE_CALL_REQ_SRC_ADDR_OFF);
dest_addr = (rose_address *)(skb->data + ROSE_CALL_REQ_DEST_ADDR_OFF);
+ if (ax25 == NULL) {
+ printk(KERN_ERR "rose_route_frame : called with ax25 callback == NULL\n");
+ return res;
+ }
+
spin_lock_bh(&rose_neigh_list_lock);
spin_lock_bh(&rose_route_list_lock);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 3/6]NET:AX25:ROSE Traps calls to rose_route_frame with a NULL ax25 callback
@ 2016-08-14 13:41 f6bvp
0 siblings, 0 replies; 2+ messages in thread
From: f6bvp @ 2016-08-14 13:41 UTC (permalink / raw)
To: netdev, linux-hams; +Cc: Ralf Baechle, Richard Stearn, Bernard Pidoux
Hi Richard,
Thanks for this patch and all others for ROSE code you sent recently.
I already committed a similar one in february 2016.
Subject: [Patch] rose_route_frame() NULL pointer dereference kernel panic
From: f6bvp <f6bvp@xxxxxxx>
Date: Wed, 24 Feb 2016 17:53:11 +0100
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>, "'f6bvp'" <f6bvp@xxxxxxx>,
davem@xxxxxxxxxxxxx
You may browse linux servers for author f6bvp and see my last findings
about null ax25.
However, despite all my efforts, I did no convince referees of the
patch's legitimity and it had not been accepted.
I hope your work for improving rose code will be successful to the
benefit of all radioamateur packet community!
73 de Bernard, f6bvp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-14 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-16 9:43 [PATCH 3/6]NET:AX25:ROSE Traps calls to rose_route_frame with a NULL ax25 callback Richard Stearn
2016-08-14 13:41 f6bvp
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.