All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/5] CVE: net: fix unbounded memcpy of UDP packet//RE: [PATCH 1/5] CVE: net: fix unbounded memcpy of UDP packet
@ 2019-08-29 13:47 liucheng
  2019-09-03 18:24 ` Joe Hershberger
  2019-09-04 16:41 ` [U-Boot] " Joe Hershberger
  0 siblings, 2 replies; 3+ messages in thread
From: liucheng @ 2019-08-29 13:47 UTC (permalink / raw)
  To: u-boot

Changes in v2:
- Add reviewed-by and reported-by tags for patch 1/5
--------------------------------------------------------------------------------------------------------------
CVE: net: fix unbounded memcpy of UDP packet

This patch adds a check to udp_len to fix unbounded memcpy for
CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199.

Signed-off-by: Cheng Liu <liucheng32@huawei.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reported-by: Fermín Serna <fermin@semmle.com>
---
 net/net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/net.c b/net/net.c
index 40511db..68f9693 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1253,6 +1253,9 @@ void net_process_received_packet(uchar *in_packet, int len)
 			return;
 		}
 
+		if (ntohs(ip->udp_len) < UDP_HDR_SIZE || ntohs(ip->udp_len) > ntohs(ip->ip_len))
+			return;
+
 		debug_cond(DEBUG_DEV_PKT,
 			   "received UDP (to=%pI4, from=%pI4, len=%d)\n",
 			   &dst_ip, &src_ip, len);
-- 
1.8.5.6

-----Original Message-----
From: Simon Goldschmidt [mailto:simon.k.r.goldschmidt at gmail.com] 
Sent: Thursday, August 22, 2019 3:30 AM
To: liucheng (G) <liucheng32@huawei.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [U-Boot] [PATCH 1/5] CVE: net: fix unbounded memcpy of UDP packet

On Wed, Aug 21, 2019 at 8:32 PM Cheng Liu <liucheng32@huawei.com> wrote:
>
> CVE: net: fix unbounded memcpy of UDP packet
>
> This patch adds a check to udp_len to fix unbounded memcpy for
> CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199.
>
> Signed-off-by: Cheng Liu <liucheng32@huawei.com>

Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

Although being annoyed by the lack of response from Fermin nearly a
month ago, would it make sense to add:

Reported-by: Fermín Serna <fermin@semmle.com>

Regards,
Simon

> ---
>  net/net.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/net/net.c b/net/net.c
> index 40511db..68f9693 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -1253,6 +1253,9 @@ void net_process_received_packet(uchar *in_packet, int len)
>                         return;
>                 }
>
> +               if (ntohs(ip->udp_len) < UDP_HDR_SIZE || ntohs(ip->udp_len) > ntohs(ip->ip_len))
> +                       return;
> +
>                 debug_cond(DEBUG_DEV_PKT,
>                            "received UDP (to=%pI4, from=%pI4, len=%d)\n",
>                            &dst_ip, &src_ip, len);
> --
> 1.8.5.6
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v2 1/5] CVE: net: fix unbounded memcpy of UDP packet//RE: [PATCH 1/5] CVE: net: fix unbounded memcpy of UDP packet
  2019-08-29 13:47 [U-Boot] [PATCH v2 1/5] CVE: net: fix unbounded memcpy of UDP packet//RE: [PATCH 1/5] CVE: net: fix unbounded memcpy of UDP packet liucheng
@ 2019-09-03 18:24 ` Joe Hershberger
  2019-09-04 16:41 ` [U-Boot] " Joe Hershberger
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2019-09-03 18:24 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 29, 2019 at 8:48 AM liucheng (G) <liucheng32@huawei.com> wrote:
>
> Changes in v2:
> - Add reviewed-by and reported-by tags for patch 1/5
> --------------------------------------------------------------------------------------------------------------
> CVE: net: fix unbounded memcpy of UDP packet
>
> This patch adds a check to udp_len to fix unbounded memcpy for
> CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199.
>
> Signed-off-by: Cheng Liu <liucheng32@huawei.com>
> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Reported-by: Fermín Serna <fermin@semmle.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] CVE: net: fix unbounded memcpy of UDP packet
  2019-08-29 13:47 [U-Boot] [PATCH v2 1/5] CVE: net: fix unbounded memcpy of UDP packet//RE: [PATCH 1/5] CVE: net: fix unbounded memcpy of UDP packet liucheng
  2019-09-03 18:24 ` Joe Hershberger
@ 2019-09-04 16:41 ` Joe Hershberger
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2019-09-04 16:41 UTC (permalink / raw)
  To: u-boot

Hi liucheng,

https://patchwork.ozlabs.org/patch/1155274/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-04 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 13:47 [U-Boot] [PATCH v2 1/5] CVE: net: fix unbounded memcpy of UDP packet//RE: [PATCH 1/5] CVE: net: fix unbounded memcpy of UDP packet liucheng
2019-09-03 18:24 ` Joe Hershberger
2019-09-04 16:41 ` [U-Boot] " Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.