Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
qemu.23275
tftp-check-tftp_input-buffer-size.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tftp-check-tftp_input-buffer-size.patch of Package qemu.23275
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> Date: Fri, 4 Jun 2021 16:34:30 +0400 Subject: tftp: check tftp_input buffer size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-commmit: 3f17948137155f025f7809fdc38576d5d2451c3d References: bsc#1187366, CVE-2021-3595 Fixes: CVE-2021-3595 Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/46 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Jose R Ziviani <jose.ziviani@suse.com> --- src/tftp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/slirp/src/tftp.c b/slirp/src/tftp.c index c209145282fac8afdf57dc17bcf5..5a6279396684ef809742bbbd0ee3 100644 --- a/slirp/src/tftp.c +++ b/slirp/src/tftp.c @@ -444,7 +444,11 @@ static void tftp_handle_error(Slirp *slirp, struct sockaddr_storage *srcsas, void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m) { - struct tftp_t *tp = (struct tftp_t *)m->m_data; + struct tftp_t *tp = mtod_check(m, offsetof(struct tftp_t, x.tp_buf)); + + if (tp == NULL) { + return; + } switch (ntohs(tp->tp_op)) { case TFTP_RRQ:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor