[Bug 206648] Fix double strlen in ktrstruct

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 26 18:10:38 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206648

--- Comment #3 from Mateusz Guzik <mjg at FreeBSD.org> ---
Maybe it should be noted that even with all callers behaving as they should,
there indeed could be a problem here. If there was a bug elsewhere in the
kernel allowing someone to modify the passed string they could indeed try to
trick the kernel into overflowing the buffer by moving the null terminator
before strcpy is called.

However, I consider trying to fight these kind of problems in this way to be a
non-starter.

That said, the code is somewhat weaker than it could be, but changing this
place while there are zilions other places with similar kind of issues is not
the way to go. Same thing applies to kernels from other projects.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list