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: <PH7PR14MB5594FC3D152B9D679CBDB597CEAB9@PH7PR14MB5594.namprd14.prod.outlook.com>
Date:   Mon, 13 Jun 2022 15:06:32 +0800
From:   Celeste Liu <coelacanthus@...look.com>
To:     Guo Ren <guoren@...nel.org>
Cc:     Celeste Liu <coelacanthus@...look.com>, xctan <xc-tan@...look.com>,
        Wang Ruikang <dramforever@...e.com>,
        Ruizhe Pan <c141028@...il.com>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Guo Ren <guoren@...nel.org>, Yash Shah <yash.shah@...ive.com>
Subject: Re: [PATCH v2] riscv: don't allow write but not read page mapping
 request in mmap

On Mon, Jun 13, 2022 at 01:44:28PM +0800, Guo Ren wrote:
> Yes, PROT_EXEC would prevent next PROT_READ check.
> 
> Looks good to me.
> 
> Reviewed-by: Guo Ren <guoren@...nel.org>

> > -               if (unlikely(!(prot & PROT_READ)))
> > -                       return -EINVAL;
> Could we put your comment here?
> 
> /*
>  * As mentioned in Table 4.5 in RISC-V spec Volume 2 Section 4.3 version
>  * "20211203 Privileged Architecture v1.12, Ratified"[1], the PTE permission
>  * bit combination of "write+!read" is "Reserved for future use.". Hence, don't
>  * allow such mapping request in mmap call. In the current code[2], write+exec
>  * only is marked as invalid, but write only is not marked as invalid.
>  */
> 

ok, I will add it in next verison.

--
Best Regards
 Coelacanthus

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ