Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264372
b: refs/heads/master
c: c7fd0d4
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Daley authored and David S. Miller committed Oct 17, 2011
1 parent a84b545 commit f833057
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f36c23bb9f822904dacf83a329518d0a5fde7968
refs/heads/master: c7fd0d48bde943e228e9c28ce971a22d6a1744c4
6 changes: 6 additions & 0 deletions trunk/net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,12 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
goto out_clear_request;
skb_pull(skb,len);

/*
* Ensure that the amount of call user data is valid.
*/
if (skb->len > X25_MAX_CUD_LEN)
goto out_clear_request;

/*
* Find a listener for the particular address/cud pair.
*/
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/x25/x25_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp
* Copy any Call User Data.
*/
if (skb->len > 0) {
if (skb->len > X25_MAX_CUD_LEN)
goto out_clear;

skb_copy_from_linear_data(skb,
x25->calluserdata.cuddata,
skb->len);
Expand Down

0 comments on commit f833057

Please sign in to comment.