Blob Blame History Raw
From: Denis Kirjanov <dkirjanov@suse.de>
Subject: fuse: handle kABI change in struct sock
Patch-mainline: Never, kABI fix
References: bsc#1194535 CVE-2021-4203

The backport of commit 	35306eb23814444bd4021f8a1c3047d3cb0c8b2b
 ("af_unix: fix races in sk_peer_pid and sk_peer_cred accesses") requires
a kABI fix as it adds a field to struct sock.
The structure has a hole:

...
	kuid_t                     sk_uid;               /*   552     4 */

	/* XXX 4 bytes hole, try to pack */

	struct pid *               sk_peer_pid;          /*   560     8 */
	const struct cred  *       sk_peer_cred;         /*   568     8 */
...

Signed-off-by: Denis Kirjanov <dkirjanov@suse.de>

---
 include/net/sock.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -470,7 +470,9 @@ struct sock {
 	u32			sk_ack_backlog;
 	u32			sk_max_ack_backlog;
 	kuid_t			sk_uid;
+#ifndef __GENKSYMS__
 	spinlock_t		sk_peer_lock;
+#endif
 	struct pid		*sk_peer_pid;
 	const struct cred	*sk_peer_cred;