Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2012-01-14 Thread Mike Frysinger
On Wednesday 11 January 2012 13:19:52 Doug Anderson wrote: > + if (cmdline && (cmdline[0] != '\0')) { > + char *start = strstr(cmdline, CONSOLE_ARG); > + > if (start) { > - end = strchr(start, ' '); > - strncpy(buf, cmdline, (sta

[U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2012-01-11 Thread Doug Anderson
This makes fixup_silent_linux() use malloc() to allocate its working space, meaning that our maximum kernel command line should only be limited by malloc(). Previously it was silently overflowing the stack. Note that nothing about this change increases the kernel's maximum command line length. I

Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2012-01-10 Thread Mike Frysinger
On Tuesday 10 January 2012 17:51:15 Doug Anderson wrote: > On Tue, Jan 10, 2012 at 2:28 PM, Wolfgang Denk wrote: > > I think your patch is likely to break all these architectures? > > I'm not sure how my patch would break these architectures. if the kernel doesn't do len checking on the input str

Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2012-01-10 Thread Mike Frysinger
On Tuesday 10 January 2012 17:28:05 Wolfgang Denk wrote: > Doug Anderson wrote: > > This makes fixup_silent_linux() use malloc() to allocate its > > working space, meaning that our maximum kernel command line > > should only be limited by malloc(). Previously it was silently > > overflowing the st

Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2012-01-10 Thread Doug Anderson
Dear Wolfgang Denk, On Tue, Jan 10, 2012 at 2:28 PM, Wolfgang Denk wrote: >> This makes fixup_silent_linux() use malloc() to allocate its >> working space, meaning that our maximum kernel command line >> should only be limited by malloc().  Previously it was silently >> overflowing the stack. > .

Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2012-01-10 Thread Wolfgang Denk
Dear Doug Anderson, In message <1319133298-30249-1-git-send-email-diand...@chromium.org> you wrote: > This makes fixup_silent_linux() use malloc() to allocate its > working space, meaning that our maximum kernel command line > should only be limited by malloc(). Previously it was silently > overf

[U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()

2011-10-20 Thread Doug Anderson
This makes fixup_silent_linux() use malloc() to allocate its working space, meaning that our maximum kernel command line should only be limited by malloc(). Previously it was silently overflowing the stack. Signed-off-by: Doug Anderson --- v2: This is a simpler version of patch 3/4 in my previou