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] [day] [month] [year] [list]
Message-ID: <CAAXkRof5YiRg-NP6_=XTS8TvsTkHb7p4+SXeDbp_jVNhUy_QTg@mail.gmail.com>
Date:   Mon, 3 Apr 2017 09:52:38 -0700
From:   Joseph Richey <joerichey94@...il.com>
To:     "Theodore Ts'o" <tytso@....edu>
Cc:     linux-ext4@...r.kernel.org, Michael Halcrow <mhalcrow@...gle.com>,
        Joe Richey <joerichey@...gle.com>
Subject: Re: [PATCH] misc: fixed error handling in e4crypt

Thanks for catching this! KEYCTL_GET_KEYRING_ID returns -1 on error, so
e4crypt should definitely exit here. Sending the revised path.

Joe

On Sat, Apr 1, 2017 at 9:24 AM, Theodore Ts'o <tytso@....edu> wrote:
> On Mon, Mar 20, 2017 at 08:34:36PM +0000, Joe Richey wrote:
>> +     if (keyring_id == KEY_SPEC_SESSION_KEYRING) {
>> +             keyring_id = keyctl(KEYCTL_GET_KEYRING_ID, keyring_id, 0);
>> +             if (keyring_id < 0)
>> +                     printf("Could not get session keyring.\n");
>> +     }
>>       rc = add_key(EXT2FS_KEY_TYPE_LOGON, key_ref_full, (void *)&key,
>>                    sizeof(key), keyring_id);
>
> Are you sure this is right?  If keyring_id is negative, we'll print
> the warning/error message --- and then pass the negative keyring_id to
> add_key.  Is that going to do the right thing?
>
>                                         - Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ