mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
tipc: reinitialize pointer after skb linearize
The msg pointer into header may change after skb linearization. We must reinitialize it after calling skb_linearize to prevent operating on a freed or invalid pointer. Signed-off-by: Erik Hugne <[email protected]> Reported-by: Tamás Végh <[email protected]> Acked-by: Ying Xue <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
aab0c0e62e
commit
4e3ae00100
1 changed files with 1 additions and 0 deletions
|
|
@ -539,6 +539,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)
|
|||
*err = -TIPC_ERR_NO_NAME;
|
||||
if (skb_linearize(skb))
|
||||
return false;
|
||||
msg = buf_msg(skb);
|
||||
if (msg_reroute_cnt(msg))
|
||||
return false;
|
||||
dnode = addr_domain(net, msg_lookup_scope(msg));
|
||||
|
|
|
|||
Loading…
Reference in a new issue