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:
cd9cf5a
)
upd6: check udp6_input buffer size
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Fri, 4 Jun 2021 12:32:55 +0000
(16:32 +0400)
committer
wanchao-xu
<wanchao.xu@samsung.com>
Tue, 9 Jan 2024 12:03:34 +0000
(20:03 +0800)
Git-commit:
de71c15de66ba9350bf62c45b05f8fbff166517b
References: bsc#
1187365
, CVE-2021-3593
Fixes: CVE-2021-3593
Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/45
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jose R Ziviani <jose.ziviani@suse.com>
slirp/src/udp6.c
patch
|
blob
|
history
diff --git
a/slirp/src/udp6.c
b/slirp/src/udp6.c
index 6f9486bbcae904542547c590b0c3f673f8cb5d21..8c490e4d10abecc536ce4405e223cb637d2f19ad 100644
(file)
--- a/
slirp/src/udp6.c
+++ b/
slirp/src/udp6.c
@@
-28,7
+28,10
@@
void udp6_input(struct mbuf *m)
ip = mtod(m, struct ip6 *);
m->m_len -= iphlen;
m->m_data += iphlen;
- uh = mtod(m, struct udphdr *);
+ uh = mtod_check(m, sizeof(struct udphdr));
+ if (uh == NULL) {
+ goto bad;
+ }
m->m_len += iphlen;
m->m_data -= iphlen;