[PATCH] UserfaultFD: Fix stack corruption when zeroing uffd_msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Emelyanov <xemul@xxxxxxxxxxxxx>

---

diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 026ef99..c89e96f 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -134,7 +134,7 @@ static inline void msg_init(struct uffd_msg *msg)
 	 * Must use memset to zero out the paddings or kernel data is
 	 * leaked to userland.
 	 */
-	memset(&msg, 0, sizeof(struct uffd_msg));
+	memset(msg, 0, sizeof(struct uffd_msg));
 }
 
 static inline struct uffd_msg userfault_msg(unsigned long address,


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]