[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find command misbehaves on debian with kernel 4.9



Hi,

On 20/07/17 16:55, Anthony DeRobertis wrote:
> On Fri, Jun 30, 2017 at 10:15:15PM +0430, Cyrus Sh wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Searching for system-resolved service following the recent
>> vulnerability disclosure, I came to see a very strange behavior from
>> find command.
>>
>>  root@localhost:/# find . -name "*systemd-resolved*"
>> ./usr/share/man/man8/systemd-resolved.service.8.gz
>> ./usr/share/man/man8/systemd-resolved.8.gz
>>
>> The command returns 0 or two lines as output for the first run. But if
>> I run the command the second time I get:
> 
> I tried this on a VM running Jessie w/ the bpo kernel. It reproduces
> here.
> 
>    vm:~# echo 1 > /proc/sys/vm/drop_caches 
>    vm:~# cd /
>    vm:/# find . -name "*systemd-resolved*"
>    ./usr/share/man/man8/systemd-resolved.service.8.gz
>    ./usr/share/man/man8/systemd-resolved.8.gz
>    vm:/# find . -name "*systemd-resolved*"
>    ./usr/share/man/man8/systemd-resolved.service.8.gz
>    ./usr/share/man/man8/systemd-resolved.8.gz
>    ./lib/systemd/system/systemd-resolved.service
>    ./lib/systemd/systemd-resolved
>    
> Although it only happened once. I tried another 20-odd times, even using 3 for
> drop_caches, and couldn't make it happen again.
> 
> But on another VM, on the first try. So apparently drop_caches isn't
> strong enough to make it happen again

Using:
echo 3 > /proc/sys/vm/drop_caches

might give you more success. Using 1 only drops the page cache, not the
dentry or inode caches.

James

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: