]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/extra/0004-slirp-check-len-against-dhcp-options-array-end.patch
bump version to 2.9.1-9
[pve-qemu.git] / debian / patches / extra / 0004-slirp-check-len-against-dhcp-options-array-end.patch
CommitLineData
3dcc8d3b 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
e74c0f31
WB
2From: Prasad J Pandit <pjp@fedoraproject.org>
3Date: Mon, 17 Jul 2017 17:33:26 +0530
3dcc8d3b 4Subject: [PATCH] slirp: check len against dhcp options array end
e74c0f31
WB
5
6While parsing dhcp options string in 'dhcp_decode', if an options'
7length 'len' appeared towards the end of 'bp_vend' array, ensuing
8read could lead to an OOB memory access issue. Add check to avoid it.
9
10This is CVE-2017-11434.
11
12Reported-by: Reno Robert <renorobert@gmail.com>
13Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
14Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15---
16 slirp/bootp.c | 3 +++
17 1 file changed, 3 insertions(+)
18
19diff --git a/slirp/bootp.c b/slirp/bootp.c
20index 5a4646c182..5dd1a415b5 100644
21--- a/slirp/bootp.c
22+++ b/slirp/bootp.c
23@@ -123,6 +123,9 @@ static void dhcp_decode(const struct bootp_t *bp, int *pmsg_type,
24 if (p >= p_end)
25 break;
26 len = *p++;
27+ if (p + len > p_end) {
28+ break;
29+ }
30 DPRINTF("dhcp: tag=%d len=%d\n", tag, len);
31
32 switch(tag) {
33--
342.11.0
35