DescriptionAddress some security concerns in the cgpt tool.
1. Check for potential integer overflow in sector_bytes * sector_count.
2. Added O_NOFOLLOW to open() call - Is this enough?
3. Passing buffer length to GuidToStr(), PMBRToStr().
4. Use unsigned int in GetEntry() to determine stride.
5. Address conversion between UTF16 and UTF8.
Note: The UTF conversion is complex and troublesome, and needs careful
consideration to get right. For now, I've just forced the interpretation of
the partition name to 7-bit ASCII. That's sufficient for the needs of Chrome
OS, and I can file a new issue to handle UTF correctly.
BUG=chrome-os-partner:705
TEST=manual
Running "make runtests" invokes the tests/run_cgpt_tests.sh script, which checks the behavior and output of the cgpt tool.
Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=c4e92af
Patch Set 1 #
Total comments: 14
Patch Set 2 : Respond to feedback. #
Total comments: 6
Patch Set 3 : A little more cleanup. Take one more look, please. #
Messages
Total messages: 9 (0 generated)
|