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-next>] [day] [month] [year] [list]
Date:   Wed, 18 May 2022 09:18:41 +0000
From:   "GONG, Ruiqi" <gongruiqi1@...wei.com>
To:     David Howells <dhowells@...hat.com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        James Morris <jmorris@...ei.org>,
        "Serge E . Hallyn" <serge@...lyn.com>,
        "Kees Cook" <keescook@...omium.org>
CC:     <keyrings@...r.kernel.org>,
        <linux-security-module@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Wang Weiyang <wangweiyang2@...wei.com>,
        "Xiu Jianfeng" <xiujianfeng@...wei.com>, <gongruiqi1@...wei.com>
Subject: [PATCH] security: keys: add __randomize_layout to keyring_search_context

Struct keyring_search_context contains a pointer to `struct cred`, which
is a security-critical structure and whose layout is randomized already.
Apply __randomize_layout to struct keyring_search_context as well, as
suggested in [1].

[1]: https://github.com/KSPP/linux/issues/188

Signed-off-by: GONG, Ruiqi <gongruiqi1@...wei.com>
---
 security/keys/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/keys/internal.h b/security/keys/internal.h
index 9b9cf3b6fcbb..3e3def5fbaa4 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -136,7 +136,7 @@ struct keyring_search_context {
 	bool			possessed;
 	key_ref_t		result;
 	time64_t		now;
-};
+} __randomize_layout;
 
 extern bool key_default_cmp(const struct key *key,
 			    const struct key_match_data *match_data);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ