[lkml]   [2019]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] kernel/sysctl.c: fix out of bounds access in fs.file-max
On Thu, Mar 28, 2019 at 2:03 PM Matteo Croce <> wrote:
> fs.file-max sysctl uses proc_doulongvec_minmax() as proc handler, which
> accesses *extra1 and *extra2 as unsigned long, but commit 32a5ad9c2285
> ("sysctl: handle overflow for file-max") assigns &zero, which is an int,
> to extra1, generating the following KASAN report.
> Fix this by changing 'zero' to long, which does not need to be duplicated
> like 'one' and 'one_ul' for two data types.


Anyone looked at this patch? Does my fix looks sane?

Matteo Croce
per aspera ad upstream

 \ /
  Last update: 2019-04-03 13:56    [W:0.125 / U:22.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site