mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-25 19:07:46 +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: bdabad3e36
("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) {
|
||||
skb_pad(skb, plen - len);
|
||||
rc = skb_pad(skb, plen - len);
|
||||
if (rc)
|
||||
goto out_node;
|
||||
skb_put(skb, plen - len);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user