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: <87bf0363-af77-1e5a-961f-72730e39e3a6@schaufler-ca.com>
Date:   Tue, 3 Sep 2019 10:40:05 -0700
From:   Casey Schaufler <casey@...aufler-ca.com>
To:     David Howells <dhowells@...hat.com>
Cc:     viro@...iv.linux.org.uk, Stephen Smalley <sds@...ho.nsa.gov>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        nicolas.dichtel@...nd.com, raven@...maw.net,
        Christian Brauner <christian@...uner.io>,
        keyrings@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        casey@...aufler-ca.com
Subject: Re: [PATCH 11/11] smack: Implement the watch_key and
 post_notification hooks [untested] [ver #7]

On 9/3/2019 8:41 AM, David Howells wrote:
> Casey Schaufler <casey@...aufler-ca.com> wrote:
>
>> I tried running your key tests and they fail in "keyctl/move/valid",
>> with 11 FAILED messages, finally hanging after "UNLINK KEY FROM SESSION".
>> It's possible that my Fedora26 system is somehow incompatible with the
>> tests. I don't see anything in your code that would cause this, as the
>> Smack policy on the system shouldn't restrict any access.
> Can you go into keyutils/tests/keyctl/move/valid/ and grab the test.out file?

Inline below

> I presume you're running with an upstream-ish kernel

Built from your tree. It's possible I've missed an important
CONFIG or two.

>  and a cutting edge
> keyutils installed?

Also built from your tree. 

>
> David

$ cat test.out
++++ BEGINNING TEST
+++ ADD KEYRING
keyctl newring wibble @s
1065401533
+++ ADD KEY
keyctl add user lizard gizzard 1065401533
483362336
+++ LIST KEYRING WITH ONE
keyctl rlist 1065401533
483362336
+++ MOVE KEY 1
keyctl move 483362336 1065401533 @s
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ CHECK KEY LINKAGE
keyctl rlist @s
1065401533
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ CHECK KEY REMOVED
keyctl rlist 1065401533
483362336
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ MOVE KEY 2
keyctl move 483362336 1065401533 @s
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ FORCE MOVE KEY 2
keyctl move -f 483362336 1065401533 @s
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ MOVE KEY 3
keyctl move 483362336 @s 1065401533
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ MOVE KEY 4
keyctl move -f 483362336 @s 1065401533
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0       \_ user: lizard
==============
+++ ADD KEY 2
keyctl add user lizard gizzard @s
898499184
+++ MOVE KEY 5
keyctl move 483362336 1065401533 @s
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0   |   \_ user: lizard
 898499184 --alswrv      0     0   \_ user: lizard
==============
+++ CHECK KEY UNMOVED
keyctl rlist 1065401533
483362336
+++ CHECK KEY UNDISPLACED
keyctl rlist @s
1065401533 898499184
+++ FORCE MOVE KEY 6
keyctl move -f 483362336 1065401533 @s
keyctl_move: Operation not supported
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0   |   \_ user: lizard
 898499184 --alswrv      0     0   \_ user: lizard
==============
+++ CHECK KEY REMOVED
keyctl rlist 1065401533
483362336
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0   |   \_ user: lizard
 898499184 --alswrv      0     0   \_ user: lizard
==============
+++ CHECK KEY DISPLACED
keyctl rlist @s
1065401533 898499184
=== FAILED ===
Session Keyring
 680859405 --alswrv      0     0  keyring: RHTS/keyctl/32472
1065401533 --alswrv      0     0   \_ keyring: wibble
 483362336 --alswrv      0     0   |   \_ user: lizard
 898499184 --alswrv      0     0   \_ user: lizard
==============
+++ UNLINK KEY FROM SESSION
keyctl unlink 483362336 @s
+++ WAITING FOR KEY TO BE UNLINKED
keyctl unlink 483362336 @s
keyctl_unlink: No such file or directory
keyctl unlink 483362336 @s
keyctl_unlink: No such file or directory

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ