u-boot: fix CVE-2026-29009
PATCH 1/1 u-boot: fix CVE-2026-29009
U-Boot before 2026.07-rc2 contains a buffer overflow vulnerability in nfs_readlink_reply() (net/nfs-common.c) when CONFIG_CMD_NFS is enabled, allowing a malicious or compromised NFS server to overflow the 2048-byte nfs_path_buff buffer by returning multiple relative symlink targets that are appended without cumulative length validation. Attackers can send two or more READLINK responses containing relative symlink targets of approximately 1100 bytes each to corrupt adjacent BSS variables including nfs_server_ip, nfs_server_mount_port, nfs_server_port, nfs_our_port, nfs_state, and rpc_id, potentially achieving memory corruption and control over the NFS client state machine.
Reference:
[https://www.cve.org/CVERecord?id=CVE-2026-29009]
Backport the patch to fix CVE-2026-29009:
[https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc]
--- .../u-boot/files/CVE-2026-29009.patch | 34 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 2b88f08722584cf235f7dacaa190af3d24deb40f Mon Sep 17 00:00:00 2001 +From: Roopa Kalmath <[email protected]> +Date: Fri, 9 Oct 2026 08:38:23 +0000 +Subject: [PATCH] u-boot:Fix CVE-2026-29009 + +CVE: CVE-2026-29009 + +Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc] + +Signed-off-by: Roopa Kalmath <[email protected]> +--- + 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);
meta/recipes-bsp/u-boot/u-boot_2026.01.bb +3 -1
@@ -3,7 +3,9 @@ require u-boot.inc DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" -SRC_URI += "file://CVE-2026-46728.patch" +SRC_URI += "file://CVE-2026-46728.patch \ + file://CVE-2026-29009.patch \ +" CVE_STATUS[CVE-2026-33243] = "cpe-incorrect: NVD currently maps this CVE to denx:u-boot, but that mapping is incorrect for U-Boot; the U-Boot-side FIT issue is tracked separately as CVE-2026-46728 and is fixed by the included U-Boot backport."
Signature · 1 line
2.49.1
Hello,
I have a few format issues with your patch but the gist of it looks good to me.
Quoted 10 lines · Roopa via lists.openembedded.org Kalmath
U-Boot before 2026.07-rc2 contains a buffer overflow vulnerability in
nfs_readlink_reply()(net/nfs-common.c) whenCONFIG_CMD_NFSis enabled, allowing a malicious or compromised NFS server to overflow the 2048-bytenfs_path_buffbuffer by returning multiple relative symlink targets that are appended without cumulative length validation. Attackers can send two or more READLINK responses containing relative symlink targets of approximately 1100 bytes each to corrupt adjacent BSS variables includingnfs_server_ip,nfs_server_mount_port,nfs_server_port,nfs_our_port,nfs_state, andrpc_id, potentially achieving memory corruption and control over the NFS client state machine.
All this paragraph is the CVE description which is not what reader of these commit messages look for. We want to know what you did to fix the CVE and why. In this case a simple
"Backport fix referenced by NVD: https://nvd.nist.gov/vuln/detail/cve-2026-29009"
is enough.
Look at https://git.openembedded.org/openembedded-core/log/?h=wrynose&qt=grep&q=CVE
to get an idea of what a commit message usually look like.
Quoted 19 lines
Reference:
[https://www.cve.org/CVERecord?id=CVE-2026-29009]Backport the patch to fix CVE-2026-29009:
[https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc]Signed-off-by Roopa Kalmath <[email protected]>--- .../u-boot/files/CVE-2026-29009.patch | 34 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patchmeta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +0
-0
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch line 10
Quoted 10 lines
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +10
-0@@ -0,0 +1,34 @@ +From 2b88f08722584cf235f7dacaa190af3d24deb40f Mon Sep 17 00:00:00 2001 +From: Roopa Kalmath <[email protected]> +Date: Fri, 9 Oct 2026 08:38:23 +0000 +Subject: [PATCH] u-boot:Fix CVE-2026-29009 + +CVE: CVE-2026-29009 + +Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc] + +Signed-off-by: Roopa Kalmath <[email protected]>
While backporting this patch you complely erased the existing commit message and authorship information. Please keep those, they help checking that we are indeed fixing the vulnerability, not introducing regressions, ...
Can you send a v2 with the above fixed?
Thanks!
Signature · 2 lines
Yoann Congal Smile ECS
PATCH v2 1/1 u-boot: fix CVE-2026-29009
In reply to Roopa Kalmathnfs_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.
Reference:
[https://nvd.nist.gov/vuln/detail/cve-2026-29009]
[https://www.cve.org/CVERecord?id=CVE-2026-29009]
Backport the patch to fix CVE-2026-29009:
[https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc]
--- .../u-boot/files/CVE-2026-29009.patch | 38 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 2b88f08722584cf235f7dacaa190af3d24deb40f Mon Sep 17 00:00:00 2001 +From: Roopa Kalmath <[email protected]> +Date: Fri, 9 Oct 2026 08:38:23 +0000 +Subject: [PATCH] u-boot:Fix CVE-2026-29009 + +CVE: CVE-2026-29009 + +Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc] + +Fixes: cf3a4f1e86 ("net: nfs: Fix CVE-2019-14195") +Cc: [email protected] +Signed-off-by: Sebastian Alba Vives <[email protected]> +Reviewed-by: Jerome Forissier <[email protected]> +Signed-off-by: Roopa Kalmath <[email protected]> +--- + 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);
meta/recipes-bsp/u-boot/u-boot_2026.01.bb +3 -1
@@ -3,7 +3,9 @@ require u-boot.inc DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" -SRC_URI += "file://CVE-2026-46728.patch" +SRC_URI += "file://CVE-2026-46728.patch \ + file://CVE-2026-29009.patch \ +" CVE_STATUS[CVE-2026-33243] = "cpe-incorrect: NVD currently maps this CVE to denx:u-boot, but that mapping is incorrect for U-Boot; the U-Boot-side FIT issue is tracked separately as CVE-2026-46728 and is fixed by the included U-Boot backport."
Signature · 1 line
2.49.1
Hello,
This second version still has issues and those are similar to v1.
Quoted 5 lines · Roopa via lists.openembedded.org Kalmath
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 exceedssizeof(nfs_path_buff), overflowing the BSS buffer into adjacent memory.
This paragraph above is referencing upstream code. This is not what need explaining here.
Quoted 7 lines
Reference:
[https://nvd.nist.gov/vuln/detail/cve-2026-29009]
[https://www.cve.org/CVERecord?id=CVE-2026-29009]Backport the patch to fix CVE-2026-29009:
[https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc]
... instead, please explain why you think the above commit is the right one to fix this CVE? (e.g. it is referenced from a trusted source: NVD, Debian, ...)
Quoted 14 lines
Signed-off-by Roopa Kalmath <[email protected]>--- .../u-boot/files/CVE-2026-29009.patch | 38 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patchmeta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +0
-0
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch line 4
Quoted 4 lines
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +4
-0@@ -0,0 +1,38 @@ +From 2b88f08722584cf235f7dacaa190af3d24deb40f Mon Sep 17 00:00:00 2001 +From: Roopa Kalmath <[email protected]> +Date: Fri, 9 Oct 2026 08:38:23 +0000 +Subject: [PATCH] u-boot:Fix CVE-2026-29009
Please keep the original:
* Subject: " net: nfs: fix buffer overflow in nfs_readlink_reply() "
* Author: "Sebastian Alba Vives"
* Commit message "nfs_readlink_reply() validates rlen only against the incoming [...]"
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch line 17
Quoted 13 lines
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +13
-0+ +CVE: CVE-2026-29009 + +Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc] + +Fixes: cf3a4f1e86 ("net: nfs: Fix CVE-2019-14195") +Cc: [email protected] +Signed-off-by: Sebastian Alba Vives <[email protected]> +Reviewed-by: Jerome Forissier <[email protected]> +Signed-off-by: Roopa Kalmath <[email protected]> +--- + net/nfs.c | 4 ++++ + 1 file changed, 4 insertions(+)
Regards,
Signature · 2 lines
Yoann Congal Smile ECS
PATCH v3 1/1 u-boot: fix CVE-2026-29009
In reply to Roopa KalmathBackport commit[1] which fixes this vulnerability as mentioned NVD report in [2].
[1] https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc
[2] https://nvd.nist.gov/vuln/detail/cve-2026-29009
--- .../u-boot/files/CVE-2026-29009.patch | 38 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 2b88f08722584cf235f7dacaa190af3d24deb40f Mon Sep 17 00:00:00 2001 +From: Roopa Kalmath <[email protected]> +Date: Fri, 9 Oct 2026 08:38:23 +0000 +Subject: net: nfs: fix buffer overflow in nfs_readlink_reply() + +CVE: CVE-2026-29009 + +Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc] + +Fixes: cf3a4f1e86 ("net: nfs: Fix CVE-2019-14195") +Cc: [email protected] +Signed-off-by: Sebastian Alba Vives <[email protected]> +Reviewed-by: Jerome Forissier <[email protected]> +Signed-off-by: Roopa Kalmath <[email protected]> +--- + 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);
meta/recipes-bsp/u-boot/u-boot_2026.01.bb +3 -1
@@ -3,7 +3,9 @@ require u-boot.inc DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" -SRC_URI += "file://CVE-2026-46728.patch" +SRC_URI += "file://CVE-2026-46728.patch \ + file://CVE-2026-29009.patch \ +" CVE_STATUS[CVE-2026-33243] = "cpe-incorrect: NVD currently maps this CVE to denx:u-boot, but that mapping is incorrect for U-Boot; the U-Boot-side FIT issue is tracked separately as CVE-2026-46728 and is fixed by the included U-Boot backport."
Signature · 1 line
2.49.1
Quoted 19 lines · Roopa via lists.openembedded.org Kalmath
Backport commit[1] which fixes this vulnerability as mentioned NVD report in [2].
[1] https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc
[2] https://nvd.nist.gov/vuln/detail/cve-2026-29009Signed-off-by Roopa Kalmath <[email protected]>--- .../u-boot/files/CVE-2026-29009.patch | 38 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patchmeta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +0
-0
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch line 2
Quoted 2 lines
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +2
-0@@ -0,0 +1,38 @@ +From 2b88f08722584cf235f7dacaa190af3d24deb40f Mon Sep 17 00:00:00 2001 +From: Roopa Kalmath <[email protected]>
^ (again) please keep the original author
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch line 5
Quoted 3 lines
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +3
-0+Date: Fri, 9 Oct 2026 08:38:23 +0000 +Subject: net: nfs: fix buffer overflow in nfs_readlink_reply() +
(again) please keep the original commit message
Quoted 9 lines
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +9
-0+CVE: CVE-2026-29009 + +Upstream-Status: Backport [https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc] + +Fixes: cf3a4f1e86 ("net: nfs: Fix CVE-2019-14195") +Cc: [email protected] +Signed-off-by: Sebastian Alba Vives <[email protected]> +Reviewed-by: Jerome Forissier <[email protected]> +Signed-off-by: Roopa Kalmath <[email protected]>
Signature · 2 lines
Yoann Congal Smile ECS
PATCH v4 1/1 u-boot: fix CVE-2026-29009
In reply to Roopa KalmathBackport commit[1] which fixes this vulnerability as mentioned NVD report in [2].
[1] https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc
[2] https://nvd.nist.gov/vuln/detail/cve-2026-29009
--- .../u-boot/files/CVE-2026-29009.patch | 53 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch new file +53 -0
@@ -0,0 +1,53 @@ +From d6694018eaddefac6aae974f9cec72fd6e58f1bc Mon Sep 17 00:00:00 2001 +From: Sebastian Josue Alba Vives <[email protected]> +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: [email protected] +Signed-off-by: Sebastian Alba Vives <[email protected]> +Reviewed-by: Jerome Forissier <[email protected]> +Signed-off-by: Roopa Kalmath <[email protected]> +--- + 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);
meta/recipes-bsp/u-boot/u-boot_2026.01.bb +3 -1
@@ -3,7 +3,9 @@ require u-boot.inc DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" -SRC_URI += "file://CVE-2026-46728.patch" +SRC_URI += "file://CVE-2026-46728.patch \ + file://CVE-2026-29009.patch \ +" CVE_STATUS[CVE-2026-33243] = "cpe-incorrect: NVD currently maps this CVE to denx:u-boot, but that mapping is incorrect for U-Boot; the U-Boot-side FIT issue is tracked separately as CVE-2026-46728 and is fixed by the included U-Boot backport."
Signature · 1 line
2.39.4
Quoted 6 lines · Roopa via lists.openembedded.org Kalmath
Backport commit[1] which fixes this vulnerability as mentioned NVD report in [2].
[1] https://git.u-boot-project.org/u-boot/u-boot/-/commit/d6694018eaddefac6aae974f9cec72fd6e58f1bc
[2] https://nvd.nist.gov/vuln/detail/cve-2026-29009
Quoted 6 lines
Signed-off-by Roopa Kalmath <[email protected]>--- .../u-boot/files/CVE-2026-29009.patch | 53 +++++++++++++++++++ meta/recipes-bsp/u-boot/u-boot_2026.01.bb | 4 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/u-boot/files/CVE-2026-29009.patch
Thanks!
It's good now. You should see this patch in the next review cycle/merge.
Regards,
Signature · 2 lines
Yoann Congal Smile ECS