projects
/
tools
/
qemu-arm-static.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e91f9c8
)
udp: check upd_input buffer size
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Fri, 4 Jun 2021 12:40:23 +0000
(16:40 +0400)
committer
wanchao-xu
<wanchao.xu@samsung.com>
Tue, 9 Jan 2024 12:04:01 +0000
(20:04 +0800)
Git-commit:
74572be49247c8c5feae7c6e0b50c4f569ca9824
References: bsc#
1187367
, CVE-2021-3594
Fixes: CVE-2021-3594
Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/47
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jose R Ziviani <jose.ziviani@suse.com>
slirp/src/udp.c
patch
|
blob
|
history
diff --git
a/slirp/src/udp.c
b/slirp/src/udp.c
index 6bde20fafab5695eedd48eb3759068049f8e9e92..c2d2f40b10880ccf677b5f10bb75cfe3b54f5641 100644
(file)
--- a/
slirp/src/udp.c
+++ b/
slirp/src/udp.c
@@
-90,7
+90,10
@@
void udp_input(register struct mbuf *m, int iphlen)
/*
* Get IP and UDP header together in first mbuf.
*/
- ip = mtod(m, struct ip *);
+ ip = mtod_check(m, iphlen + sizeof(struct udphdr));
+ if (ip == NULL) {
+ goto bad;
+ }
uh = (struct udphdr *)((char *)ip + iphlen);
/*