All of lore.kernel.org
 help / color / mirror / Atom feed
* [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009
@ 2026-11-17  7:38 Prasanth R
  2026-11-17  7:38 ` [scarthgap][PATCH 2/2] u-boot-tools: ignore CVE-2026-29007, CVE-2026-29008 and CVE-2026-29009 Prasanth R
  2026-11-21 23:11 ` [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Yoann Congal
  0 siblings, 2 replies; 6+ messages in thread
From: Prasanth R @ 2026-11-17  7:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: yoann.congal, Prasanth R

A malicious NFS server can overflow nfs_path_buff with READLINK
replies. Backport the upstream fix, as done for wrynose. It applies
to 2024.01 unchanged.

AI-Generated: Uses Claude
Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
---
Tested: built with CONFIG_CMD_NFS=y for qemux86-64. Also ran
nfs_readlink_reply() from the unpatched and patched 2024.01 source
under AddressSanitizer with two 1100-byte READLINK replies: without
this patch it overflows nfs_path_buff, with it the second reply is
dropped.

 .../u-boot/files/CVE-2026-29009.patch         | 53 +++++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot_2024.01.bb     |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch

diff --git a/meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch b/meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
new file mode 100644
index 0000000000..35f168005e
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
@@ -0,0 +1,53 @@
+From d6694018eaddefac6aae974f9cec72fd6e58f1bc Mon Sep 17 00:00:00 2001
+From: Sebastian Josue Alba Vives <sebasjosue84@gmail.com>
+Date: Thu, 9 Apr 2026 10:44:40 -0600
+Subject: [PATCH] net: nfs: fix buffer overflow in nfs_readlink_reply()
+
+nfs_readlink_reply() validates rlen only against the incoming packet
+length (inherited from CVE-2019-14195), but not against the destination
+buffer nfs_path_buff[2048]. A malicious NFS server can send a valid
+READLINK reply where pathlen + rlen exceeds sizeof(nfs_path_buff),
+overflowing the BSS buffer into adjacent memory.
+
+The recent fix in fd6e3d34097f addressed the same overflow class in
+net/lwip/nfs.c but left the legacy path in net/nfs-common.c unpatched.
+
+Add bounds checks before both memcpy calls in nfs_readlink_reply():
+- relative path branch: reject if pathlen + rlen >=
+  sizeof(nfs_path_buff)
+- absolute path branch: reject if rlen >= sizeof(nfs_path_buff)
+
+Fixes: cf3a4f1e86 ("net: nfs: Fix CVE-2019-14195")
+
+CVE: CVE-2026-29009
+
+Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc]
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Sebastian Alba Vives <sebasjosue84@gmail.com>
+Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
+Signed-off-by: Roopa Kalmath <Roopa.Kalmath@windriver.com>
+---
+ net/nfs.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/net/nfs.c b/net/nfs.c
+index 537d4c62..9b628ecf 100644
+--- a/net/nfs.c
++++ b/net/nfs.c
+@@ -698,11 +698,15 @@ static int nfs_readlink_reply(uchar *pkt, unsigned len)
+ 
+ 		strcat(nfs_path, "/");
+ 		pathlen = strlen(nfs_path);
++		if (pathlen + rlen >= sizeof(nfs_path_buff))
++			return -NFS_RPC_DROP;
+ 		memcpy(nfs_path + pathlen,
+ 		       (uchar *)&(rpc_pkt.u.reply.data[2 + nfsv3_data_offset]),
+ 		       rlen);
+ 		nfs_path[pathlen + rlen] = 0;
+ 	} else {
++		if (rlen >= sizeof(nfs_path_buff))
++			return -NFS_RPC_DROP;
+ 		memcpy(nfs_path,
+ 		       (uchar *)&(rpc_pkt.u.reply.data[2 + nfsv3_data_offset]),
+ 		       rlen);
diff --git a/meta/recipes-bsp/u-boot/u-boot_2024.01.bb b/meta/recipes-bsp/u-boot/u-boot_2024.01.bb
index 7eaeed1004..6aa98e1740 100644
--- a/meta/recipes-bsp/u-boot/u-boot_2024.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot_2024.01.bb
@@ -13,4 +13,5 @@ SRC_URI += "file://CVE-2024-57254.patch \
             file://CVE-2024-57259.patch \
             file://CVE-2024-42040.patch \
             file://CVE-2026-46728.patch \
+            file://CVE-2026-29009.patch \
 "
-- 
2.34.1


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

* [scarthgap][PATCH 2/2] u-boot-tools: ignore CVE-2026-29007, CVE-2026-29008 and CVE-2026-29009
  2026-11-17  7:38 [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Prasanth R
@ 2026-11-17  7:38 ` Prasanth R
  2026-11-21 23:11 ` [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Yoann Congal
  1 sibling, 0 replies; 6+ messages in thread
From: Prasanth R @ 2026-11-17  7:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: yoann.congal, Prasanth R

u-boot-tools shares CVE_PRODUCT with u-boot, but tools-only_defconfig
disables networking, so net/tcp.c and net/nfs.c are not built.
Same status as on wrynose.

AI-Generated: Uses Claude
Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
---
 meta/recipes-bsp/u-boot/u-boot-tools_2024.01.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2024.01.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2024.01.bb
index 4b6d89ed4e..98c4954ec3 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2024.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2024.01.bb
@@ -2,3 +2,7 @@ require u-boot-common.inc
 require u-boot-tools.inc
 
 SRC_URI += "file://CVE-2026-46728.patch"
+
+CVE_STATUS[CVE-2026-29007] = "not-applicable-config: tools-only_defconfig disables networking; net/tcp.c is not compiled into u-boot-tools."
+CVE_STATUS[CVE-2026-29008] = "not-applicable-config: tools-only_defconfig disables networking; net/tcp.c is not compiled into u-boot-tools."
+CVE_STATUS[CVE-2026-29009] = "not-applicable-config: tools-only_defconfig disables networking; net/nfs.c is not compiled into u-boot-tools."
-- 
2.34.1


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

* Re: [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009
  2026-11-17  7:38 [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Prasanth R
  2026-11-17  7:38 ` [scarthgap][PATCH 2/2] u-boot-tools: ignore CVE-2026-29007, CVE-2026-29008 and CVE-2026-29009 Prasanth R
@ 2026-11-21 23:11 ` Yoann Congal
  2026-11-21 23:13   ` Prasanth Ramesh
  2026-11-21 23:14   ` Prasanth Ramesh
  1 sibling, 2 replies; 6+ messages in thread
From: Yoann Congal @ 2026-11-21 23:11 UTC (permalink / raw)
  To: Prasanth R, openembedded-core

On Tue Nov 17, 2026 at 8:38 AM CET, Prasanth R wrote:
> A malicious NFS server can overflow nfs_path_buff with READLINK
> replies. Backport the upstream fix, as done for wrynose. It applies
> to 2024.01 unchanged.
>
> AI-Generated: Uses Claude
> Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
> ---
> Tested: built with CONFIG_CMD_NFS=y for qemux86-64. Also ran
> nfs_readlink_reply() from the unpatched and patched 2024.01 source
> under AddressSanitizer with two 1100-byte READLINK replies: without
> this patch it overflows nfs_path_buff, with it the second reply is
> dropped.
>
>  .../u-boot/files/CVE-2026-29009.patch         | 53 +++++++++++++++++++
>  meta/recipes-bsp/u-boot/u-boot_2024.01.bb     |  1 +
>  2 files changed, 54 insertions(+)
>  create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch

Hello,

Thanks for the series, but I think we need to do the merging of sources
between u-boot/u-boot-tools first as was discussed here:
  [scarthgap][PATCH] u-boot-tools: use all patches from u-boot
  https://lore.kernel.org/all/20260923173850.21338-1-peter.marko@siemens.com/T/#u

I'll hold this series until then. Beware, is the merge is accepted, you
will have to rebase your series on top. If not, feel free to ping me to
remind me of this series.

Regards,
-- 
Yoann Congal
Smile ECS


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

* Re: [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009
  2026-11-21 23:11 ` [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Yoann Congal
@ 2026-11-21 23:13   ` Prasanth Ramesh
  2026-11-21 23:22     ` Yoann Congal
  2026-11-21 23:14   ` Prasanth Ramesh
  1 sibling, 1 reply; 6+ messages in thread
From: Prasanth Ramesh @ 2026-11-21 23:13 UTC (permalink / raw)
  To: Yoann Congal; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

👍

Prasanth Ramesh reacted via Gmail
<https://www.google.com/gmail/about/?utm_source=gmail-in-product&utm_medium=et&utm_campaign=emojireactionemail#app>

[-- Attachment #2: Type: text/vnd.google.email-reaction+json, Size: 40 bytes --]

{
  "emoji": "👍",
  "version": 1
}

[-- Attachment #3: Type: text/html, Size: 292 bytes --]

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

* Re: [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009
  2026-11-21 23:11 ` [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Yoann Congal
  2026-11-21 23:13   ` Prasanth Ramesh
@ 2026-11-21 23:14   ` Prasanth Ramesh
  1 sibling, 0 replies; 6+ messages in thread
From: Prasanth Ramesh @ 2026-11-21 23:14 UTC (permalink / raw)
  To: Yoann Congal; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

Hi Yoann,

Understood, thanks for the update. I'll wait for the outcome of that
discussion and rebase if necessary.

Regards,
Prasanth R

On Sun, Nov 22, 2026 at 8:11 Yoann Congal <yoann.congal@smile.fr> wrote:

> On Tue Nov 17, 2026 at 8:38 AM CET, Prasanth R wrote:
> > A malicious NFS server can overflow nfs_path_buff with READLINK
> > replies. Backport the upstream fix, as done for wrynose. It applies
> > to 2024.01 unchanged.
> >
> > AI-Generated: Uses Claude
> > Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
> > ---
> > Tested: built with CONFIG_CMD_NFS=y for qemux86-64. Also ran
> > nfs_readlink_reply() from the unpatched and patched 2024.01 source
> > under AddressSanitizer with two 1100-byte READLINK replies: without
> > this patch it overflows nfs_path_buff, with it the second reply is
> > dropped.
> >
> >  .../u-boot/files/CVE-2026-29009.patch         | 53 +++++++++++++++++++
> >  meta/recipes-bsp/u-boot/u-boot_2024.01.bb     |  1 +
> >  2 files changed, 54 insertions(+)
> >  create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
>
> Hello,
>
> Thanks for the series, but I think we need to do the merging of sources
> between u-boot/u-boot-tools first as was discussed here:
>   [scarthgap][PATCH] u-boot-tools: use all patches from u-boot
>
> https://lore.kernel.org/all/20260923173850.21338-1-peter.marko@siemens.com/T/#u
>
> I'll hold this series until then. Beware, is the merge is accepted, you
> will have to rebase your series on top. If not, feel free to ping me to
> remind me of this series.
>
> Regards,
> --
> Yoann Congal
> Smile ECS
>
>

[-- Attachment #2: Type: text/html, Size: 2378 bytes --]

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

* Re: [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009
  2026-11-21 23:13   ` Prasanth Ramesh
@ 2026-11-21 23:22     ` Yoann Congal
  0 siblings, 0 replies; 6+ messages in thread
From: Yoann Congal @ 2026-11-21 23:22 UTC (permalink / raw)
  To: Prasanth Ramesh; +Cc: openembedded-core

On Sun Nov 22, 2026 at 12:13 AM CET, Prasanth Ramesh wrote:
> 👍
>
> Prasanth Ramesh reacted via Gmail
> <https://www.google.com/gmail/about/?utm_source=gmail-in-product&utm_medium=et&utm_campaign=emojireactionemail#app>

BTW, please refrain from using the reaction emoji from gmail on mailing
list emails. It is only supported in the gmail client.
Everybody else see this:
https://lore.kernel.org/all/CAG7eodEvJJaUjWMj_jQa1wE_hLf6owq=xwHj_9Sy3tgc8qN_qQ@mail.gmail.com/

Thanks!
-- 
Yoann Congal
Smile ECS


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

end of thread, other threads:[~2026-11-21 23:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  7:38 [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Prasanth R
2026-11-17  7:38 ` [scarthgap][PATCH 2/2] u-boot-tools: ignore CVE-2026-29007, CVE-2026-29008 and CVE-2026-29009 Prasanth R
2026-11-21 23:11 ` [scarthgap][PATCH 1/2] u-boot: fix CVE-2026-29009 Yoann Congal
2026-11-21 23:13   ` Prasanth Ramesh
2026-11-21 23:22     ` Yoann Congal
2026-11-21 23:14   ` Prasanth Ramesh

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.