We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36eff86 commit f647d72Copy full SHA for f647d72
net/netrom/nr_route.c
@@ -754,6 +754,12 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
754
int ret;
755
struct sk_buff *skbn;
756
757
+ /*
758
+ * Reject malformed packets early. Check that it contains at least 2
759
+ * addresses and 1 byte more for Time-To-Live
760
+ */
761
+ if (skb->len < 2 * sizeof(ax25_address) + 1)
762
+ return 0;
763
764
nr_src = (ax25_address *)(skb->data + 0);
765
nr_dest = (ax25_address *)(skb->data + 7);
0 commit comments