[Devel] [PATCH RHEL7 COMMIT] autofs: fix autofs_v5_packet structure for compat mode
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Aug 31 13:36:59 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.5
------>
commit e484b0abe8af8793f58e6434060a3779261d3151
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date: Thu Aug 31 13:36:59 2017 +0300
autofs: fix autofs_v5_packet structure for compat mode
Due to integer variables alignment size of struct autofs_v5_packet in 300
bytes in 32-bit architectures (instead of 304 bytes in 64-bits architectures).
This may lead to memory corruption (64 bits kernel always send 304 bytes,
while 32-bit userspace application expects for 300).
https://jira.sw.ru/browse/PSBM-71078
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
include/uapi/linux/auto_fs4.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/auto_fs4.h b/include/uapi/linux/auto_fs4.h
index e02982f..8729a47 100644
--- a/include/uapi/linux/auto_fs4.h
+++ b/include/uapi/linux/auto_fs4.h
@@ -137,6 +137,8 @@ struct autofs_v5_packet {
__u32 pid;
__u32 tgid;
__u32 len;
+ __u32 blob; /* This is needed to align structure up to 8
+ bytes for ALL archs including 32-bit */
char name[NAME_MAX+1];
};
More information about the Devel
mailing list