lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFeW=patEo56jXmyO6EPkDOf4oBwk1kaNE8OQASZHK-3d3zhZA@mail.gmail.com>
Date:	Fri, 18 May 2012 12:31:06 +0800
From:	Amos Kong <kongjianjun@...il.com>
To:	Li Zefan <lizefan@...wei.com>
Cc:	serue@...ibm.com, viro@...iv.linux.org.uk,
	linux-kernel@...r.kernel.org, tj@...nel.org, jmorris@...ei.org
Subject: Re: cgroup: denying device doesn't work with 'rw' mode string

On Fri, May 18, 2012 at 11:52 AM, Li Zefan <lizefan@...wei.com> wrote:
> Amos Kong wrote:
>
>> CC: Li Zefan <lizf@...fujitsu.com>, Tejun Heo <tj@...nel.org>, jmorris@...ei.org
>>
>> On Sat, Oct 15, 2011 at 8:39 AM, Amos Kong <kongjianjun@...il.com> wrote:
>>> # mount -t cgroup -o devices none /cgroup
>>> # mkdir /cgroups/devices
>>> # ls -l /dev/vg/lv
>>> lrwxrwxrwx. 1 root root 7 Oct 14 19:03 /dev/vg/lv -> ../dm-3
>>> # ls -l /dev/dm-3
>>> brw-rw----. 1 root disk 253, 3 Oct 14 19:03 /dev/dm-3


>>> ------- test1
>>> deny read-write permission of dm-3, but it doesn't effect.
>>>
>>> # echo a > devices/devices.allow
>>> # echo 'b 253:2 rw' > devices.deny
>
>
> 253:2 ??

sorry, typo

# echo 'b 253:3 rw' > devices.deny      # But read-write permission is
not denied

>>>                ^^
>>> # echo $$ > task
>>> # dd if=/dev/zero of=/dev/dm-3 bs=1M count=1
>>> can write to /dev/dm-3 successfully  (problem exists)
>>>
>>> ------- test2
>>> # echo a > devices/devices.allow
>>> # echo 'b 253:3 rwm' > devices/devices.deny
>
>
> 253:3 !!
>
>>>                ^^^
>>> # echo $$ > task
>>> # dd if=/dev/zero of=/dev/dm-3 bs=1M count=1
>>> couldn't write to /dev/dm-3 successfully
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ