[U-Boot] [RESEND PATCH] net: tftp: Fix tftp store address check in store_block()

Joe Hershberger joe.hershberger at ni.com
Mon Dec 2 21:06:41 CET 2019


Hi Bin,

On Sun, Dec 1, 2019 at 7:46 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Joe,
>
> On Wed, Nov 20, 2019 at 5:54 AM Joe Hershberger <joe.hershberger at ni.com> wrote:
> >
> > On Sat, Nov 16, 2019 at 12:20 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> > >
> > > During testing of qemu-riscv32 with a 2GiB memory configuration,
> > > tftp always fails with a error message:
> > >
> > >   Load address: 0x84000000
> > >   Loading: #
> > >   TFTP error: trying to overwrite reserved memory...
> > >
> > > It turns out the result of 'tftp_load_addr + tftp_load_size' just
> > > overflows (0x100000000) and the test logic in store_block() fails.
> > > Fix this by adjusting the end address to ULONG_MAX when overflow
> > > is detected.
> > >
> > > Fixes: a156c47e39ad ("tftp: prevent overwriting reserved memory")
> > > Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> >
> > Odd corner case, but sure...
> >
> > Acked-by: Joe Hershberger <joe.hershberger at ni.com>
>
> Could you pull this for v2020.01? thanks!

Yep, working on it!

I'm currently looking for the patches that are causing sizes to expand
beyond linking on a few targets.

Cheers,
-Joe


More information about the U-Boot mailing list