[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers
On (03/16/18 09:55), Petr Mladek wrote:
> I am not sure if it is worth it. I think that we would catch 99% of
> problems by checking the first byte.
> This patch was motivated by a code clean up rather than bug reports.

OK. Then I think we really need this "the patch is just good enough" line
in the commit message and a big comment in the source code.

Another idea (just an idea) - for some pointers we know the address range
we are going to access and can check the first and the last byte. E.g. for
UUID it's check_access(ptr) and check_access(ptr + len), and so on. Won't
work for string() in general case, tho.


 \ /
  Last update: 2018-03-17 02:30    [W:0.097 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site