Re: [PATCH] proc: fix /proc/*/map_files lookup some more

2018-02-21 Thread Al Viro
On Wed, Feb 21, 2018 at 09:44:11PM +0300, Alexey Dobriyan wrote: > + len = strlen(str); > + if (len > 1 && *str == '0') > + return -EINVAL; if (s[0] == '0' && s[1]) please...

Re: [PATCH] proc: fix /proc/*/map_files lookup some more

2018-02-21 Thread Al Viro
On Wed, Feb 21, 2018 at 09:44:11PM +0300, Alexey Dobriyan wrote: > + len = strlen(str); > + if (len > 1 && *str == '0') > + return -EINVAL; if (s[0] == '0' && s[1]) please...

[PATCH] proc: fix /proc/*/map_files lookup some more

2018-02-21 Thread Alexey Dobriyan
I totally forgot that _parse_integer() accepts arbitrary amount of leading zeroes leading to the following: OK # readlink /proc/1/map_files/56427ecba000-56427eddc000 /lib/systemd/systemd bogus # readlink

[PATCH] proc: fix /proc/*/map_files lookup some more

2018-02-21 Thread Alexey Dobriyan
I totally forgot that _parse_integer() accepts arbitrary amount of leading zeroes leading to the following: OK # readlink /proc/1/map_files/56427ecba000-56427eddc000 /lib/systemd/systemd bogus # readlink