mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ipv4: make ip_append_data() handle NULL routing table
Add a check in ip_append_data() for NULL *rtp to prevent future bugs in callers from being exploitable. Signed-off-by: Julien Tinnes <[email protected]> Signed-off-by: Tavis Ormandy <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9886e836a6
commit
788d908f28
1 changed files with 2 additions and 0 deletions
|
|
@ -813,6 +813,8 @@ int ip_append_data(struct sock *sk,
|
|||
inet->cork.addr = ipc->addr;
|
||||
}
|
||||
rt = *rtp;
|
||||
if (unlikely(!rt))
|
||||
return -EFAULT;
|
||||
/*
|
||||
* We steal reference to this route, caller should not release it
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue