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

2018-03-04 Thread Cyrill Gorcunov
On Sun, Mar 04, 2018 at 12:51:30AM +0300, Alexey Dobriyan wrote: > I totally forgot that _parse_integer() accepts arbitrary amount of > leading zeroes leading to the following lookups: > > OK > # readlink /proc/1/map_files/56427ecba000-56427eddc000 > /lib/systemd/systemd

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

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

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

2018-02-21 Thread Andrew Morton
On Wed, 21 Feb 2018 22:53:40 +0300 Alexey Dobriyan wrote: > 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 > >

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

2018-02-21 Thread Alexey Dobriyan
On Wed, Feb 21, 2018 at 12:04:03PM -0800, Andrew Morton wrote: > On Wed, 21 Feb 2018 22:53:40 +0300 Alexey Dobriyan > wrote: > > > I totally forgot that _parse_integer() accepts arbitrary amount of > > leading zeroes leading to the following: > > > > OK > > # readlink /proc/1/ma

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

2018-02-21 Thread Cyrill Gorcunov
On Wed, Feb 21, 2018 at 12:04:03PM -0800, Andrew Morton wrote: > > I don't know this code and I'm all confused. > > - why is the code designed to accept addresses of "0"? It was never designed to accept addresses of 0, it is rather a side effect of using sscanf in first place. The address priti

[PATCH v2] 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 /proc/1/map_files/56427ec