Messages in this thread |  | | Date | Mon, 10 Oct 2005 22:36:59 +0200 | | From | Georg Lippold <> | | Subject | Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE |
| |
Hi Alon,
Alon Bar-Lev wrote: > For boot protocol <2.02, the kernel command line is a null-terminated > string up to 255 characters long, plus the final null. For boot protocol >>=2.02 command line that is referred by cmd_line_ptr is null-terminated > string, the kernel will truncate this string if it is too large to handle.
Thus, someone could use bootloaders to "patch" the kernel: If the bootloader writes a string of arbitary length to some memory region, then there is a fair chance that if you make the string just long enough, the kernel image gets (partly) overwritten. It resembles a bit "Smashing the stack for fun and profit", but this time, it's "Rewriting the kernel to your own needs via the bootloader on x86" :)
Same thing for user defined COMMAND_LINE_SIZE. I think that a common interface for boot loaders is required. Especially in uncontrolled multi user environments like Universities, everything else could lead to undesired results.
Greetings,
Georg - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |