mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 12:53:27 +00:00
net: qrtr: potential use after free in qrtr_sendmsg()
If skb_pad() fails then it frees the skb so we should check for errors. Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
89087c456f
commit
6f60f43810
@ -658,7 +658,9 @@ static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (plen != len) {
|
if (plen != len) {
|
||||||
skb_pad(skb, plen - len);
|
rc = skb_pad(skb, plen - len);
|
||||||
|
if (rc)
|
||||||
|
goto out_node;
|
||||||
skb_put(skb, plen - len);
|
skb_put(skb, plen - len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user