Re: [PATCH] kernel/sysctl.c: Fix out-of-bounds access when setting file-max

2019-04-03 Thread Will Deacon
Hi Christian, On Wed, Apr 03, 2019 at 05:40:45PM +0200, Christian Brauner wrote: > On Wed, Apr 03, 2019 at 04:34:09PM +0100, Will Deacon wrote: > > Commit 32a5ad9c2285 ("sysctl: handle overflow for file-max") hooked > > up min/max values for the file-max sysctl parameter via the .extra1 > > and .e

Re: [PATCH] kernel/sysctl.c: Fix out-of-bounds access when setting file-max

2019-04-03 Thread Christian Brauner
On Wed, Apr 03, 2019 at 04:34:09PM +0100, Will Deacon wrote: > Commit 32a5ad9c2285 ("sysctl: handle overflow for file-max") hooked > up min/max values for the file-max sysctl parameter via the .extra1 > and .extra2 fields in the corresponding struct ctl_table entry. > > Unfortunately, the minimum

[PATCH] kernel/sysctl.c: Fix out-of-bounds access when setting file-max

2019-04-03 Thread Will Deacon
Commit 32a5ad9c2285 ("sysctl: handle overflow for file-max") hooked up min/max values for the file-max sysctl parameter via the .extra1 and .extra2 fields in the corresponding struct ctl_table entry. Unfortunately, the minimum value points at the global 'zero' variable, which is an int. This resul