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]
Date:   Fri, 01 Sep 2017 15:21:49 +0400
From:   Stanislav Kinsburskiy <skinsbursky@...tuozzo.com>
To:     raven@...maw.net
Cc:     autofs@...r.kernel.org, linux-kernel@...r.kernel.org,
        devel@...nvz.org, ldv@...linux.org
Subject: [RFC PATCH 2/2] autofs: sent 32-bit sized packet for 32-bit process

The structure autofs_v5_packet (except name) is not aligned by 8 bytes, which
leads to different sizes in 32 and 64-bit architectures.
Let's form 32-bit compatible packet when daemon has 32-bit addressation.

Suggested-by: Dmitry V. Levin <ldv@...linux.org>
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@...tuozzo.com>
---
 fs/autofs4/waitq.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 24a58bf..1f9b7d8 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -151,6 +151,11 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
 		struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet;
 		struct user_namespace *user_ns = sbi->pipe->f_cred->user_ns;
 
+#ifdef CONFIG_COMPAT
+		if (sbi->is32bit)
+			pktsz = offsetofend(struct autofs_v5_packet, name);
+		else
+#endif
 		pktsz = sizeof(*packet);
 
 		packet->wait_queue_token = wq->wait_queue_token;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ