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: <a78166b3-4e99-89c7-c435-d42bd94e9536@intel.com>
Date:   Tue, 5 Apr 2022 11:35:33 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>, <linux-sgx@...r.kernel.rog>
CC:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Nathaniel McCallum <nathaniel@...fian.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        "open list:INTEL SGX" <linux-sgx@...r.kernel.org>,
        "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" 
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] x86/sgx: Simplify struct
 sgx_enclave_restrict_permissions

Hi Jarkko,

On 4/5/2022 11:30 AM, Jarkko Sakkinen wrote:
> On Tue, 2022-04-05 at 10:21 -0700, Reinette Chatre wrote:
>> Hi Jarkko,
>>
>> On 4/5/2022 8:16 AM, Jarkko Sakkinen wrote:
>>> The reasoning to change SECINFO to simply flags is stated in this inline
>>> comment:
>>>
>>> /*
>>>  * Return valid permission fields from a secinfo structure provided by
>>>  * user space. The secinfo structure is required to only have bits in
>>>  * the permission fields set.
>>>  */
>>>
>>> It is better to simply change the parameter type than require to use
>>> a malformed version of a data structure.
>>
>> Could you please elaborate what is malformed?
> 
> The structure that is accepted by the API. According to SDM permission
> changes are done with a structure where PT_REG is set, which gives
> -EINVAL. I categorize it as a bug.

I assume that you are referring to this line from the SDM:

IF (EPCM(DS:RCX).PT is not PT_REG)
    THEN #PF(DS:RCX); FI;

Please note that the above tests the PT bit of the EPCM
entry, not the PT field in the provided SECINFO.

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ