Re: [tboot-devel] Real-mode Linux command line buffer overflow

2016-12-28 Thread Ed Swierk
Reducing TBOOT_KERNEL_CMDLINE_SIZE to 256 bytes works. Moving KERNEL_CMDLINE_OFFSET down to accommodate 1024 bytes also works; see the patch I just posted. The other patch I posted truncates the command line to the size of the buffer in the real-mode boot header, to eliminate the possibility of ov

[tboot-devel] [PATCH] Increase command line in Linux real-mode boot header to 1024 bytes

2016-12-28 Thread Ed Swierk
256 bytes is awfully short, and 1024 matches the size of the temporary buffer tboot uses to manipulate the command line. Signed-off-by: Ed Swierk --- tboot/common/linux.c| 4 ++-- tboot/include/linux_defns.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tboot/com

[tboot-devel] [PATCH] Fix Linux kernel command line buffer overflow

2016-12-28 Thread Ed Swierk
Respect the size of the real-mode boot header when zeroing and copying in the command line, to avoid stomping on the BIOS EBCA or risk BIOS SMM code stomping on the command line. Signed-off-by: Ed Swierk --- tboot/common/linux.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletio

Re: [tboot-devel] Real-mode Linux command line buffer overflow

2016-12-28 Thread Sun, Ning
Hi Ed, Thanks for reporting this issue, we will root cause and fix the issue as soon as we can. As we do not have an Intel S2600GL machine at hand, to root cause completely your issue, can you try this by modifying the config.h file and build the tboot.gz: //#define TBOOT_KERNEL_CMDLINE_SIZE