News for hackers. Stuff that matters.
Re:VirtualBox is garbage by xentronium on Friday October 07, 2011 @02:29PM (#3085243)
strcmp (and many other string routines like strlen, strcpy) relies on strings being null terminated. Safe versions (strncmp, strnlen, strncpy) have a parameter for maximum string length.

I am pretty sure that in this particular case it is not passed any user input, so it's kinda safe.

Re:VirtualBox is garbage by Locke1689 on Friday October 07, 2011 @05:54PM (#3086158)
In this case it should be fine because the second argument is a string literal (guaranteed to be null-terminated) and the function doesn't continue past the end of the first null-terminated string.
Re:VirtualBox is garbage by antihero on Friday October 07, 2011 @03:03PM (#3085386)
Would be a pretty neat exploit to buffer overflow someone's actual kernel via a carefully constructed module name, though.
Re:VirtualBox is garbage by 1amzave on Friday October 07, 2011 @03:59PM (#3085604)
A neat hack, yes...but probably not worthwhile from the perspective of an actual attacker (if you've got permissions to load a kernel module, you could just load one of your own crafting to do whatever nefarious things you wanted directly).
Re:VirtualBox is garbage by ori_b on Friday October 07, 2011 @03:37PM (#3085523)
If you haven't validated or ensured that your string is a string you've already lost.