From: Tom Rini <trini@konsulko.com>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Jerome Forissier <jerome.forissier@linaro.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
u-boot@lists.denx.de
Subject: Re: [PATCH 3/3] net: use strnstr() for lwip_strnstr()
Date: Mon, 20 Jan 2025 20:33:41 -0600 [thread overview]
Message-ID: <20250121023341.GH3476@bill-the-cat> (raw)
In-Reply-To: <2a8916fb-79c4-491a-85e7-bdef6556a1c6@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]
On Tue, Jan 21, 2025 at 03:18:11AM +0100, Heinrich Schuchardt wrote:
> On 21.01.25 02:05, Tom Rini wrote:
> > On Sat, Jan 04, 2025 at 12:21:18AM +0100, Heinrich Schuchardt wrote:
> >
> > > Using strstr() instead of strnstr() creates a security concern.
> > >
> > > Fixes: 1c41a7afaa15 ("net: lwip: build lwIP")
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
> > > ---
> > > lib/lwip/u-boot/arch/cc.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/lib/lwip/u-boot/arch/cc.h b/lib/lwip/u-boot/arch/cc.h
> > > index de138846358..6104c296f6f 100644
> > > --- a/lib/lwip/u-boot/arch/cc.h
> > > +++ b/lib/lwip/u-boot/arch/cc.h
> > > @@ -34,7 +34,7 @@
> > > x, __LINE__, __FILE__); } while (0)
> > > #define atoi(str) (int)dectoul(str, NULL)
> > > -#define lwip_strnstr(a, b, c) strstr(a, b)
> > > +#define lwip_strnstr(a, b, c) strnstr(a, b, c)
> > > #define LWIP_ERR_T int
> > > #define LWIP_CONST_CAST(target_type, val) ((target_type)((uintptr_t)val))
> >
> > This leads to:
> > https://dev.azure.com/u-boot/u-boot/_build/results?buildId=10370&view=logs&j=45c0c132-56cd-504a-56c7-1b8a534aa92b&t=f95d3367-9db2-5f2a-d3ed-8901d714dd66
> > as a failure, that I only end up seeing in Azure (I didn't track down if
> > there's some good reason we don't see this in Gitlab).
> >
>
> Hello Tom,
>
> It is not really clear how
>
> Lab failure: Timeout executing 'tftpboot 40400000 u-boot.bin
>
> could be related to this patch series.
>
> git grep -ni strstr net/
>
> only shows usage in wget but not in tftp.
Agreed.
> Is this test result reproducible in Azure?
Yes, every time. And 1/3 + 2/3 pass, with 3/3 is when it fails.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-01-21 2:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 23:21 [PATCH 0/3] net: use strnstr() for lwip_strnstr() Heinrich Schuchardt
2025-01-03 23:21 ` [PATCH 1/3] lib: implement strnstr() Heinrich Schuchardt
2025-01-06 7:44 ` Jerome Forissier
2025-01-06 10:14 ` Rasmus Villemoes
2025-01-06 10:22 ` Jerome Forissier
2025-01-03 23:21 ` [PATCH 2/3] test: unit tests for strstr() and strnstr() Heinrich Schuchardt
2025-01-09 7:53 ` Ilias Apalodimas
2025-01-03 23:21 ` [PATCH 3/3] net: use strnstr() for lwip_strnstr() Heinrich Schuchardt
2025-01-06 7:50 ` Jerome Forissier
2025-01-21 1:05 ` Tom Rini
2025-01-21 2:18 ` Heinrich Schuchardt
2025-01-21 2:33 ` Tom Rini [this message]
2025-01-20 20:52 ` [PATCH 0/3] " Tom Rini
2025-01-20 20:54 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250121023341.GH3476@bill-the-cat \
--to=trini@konsulko.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox