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] [day] [month] [year] [list]
Message-ID: <172545113382.2215.7451184896946009553.tip-bot2@tip-bot2>
Date: Wed, 04 Sep 2024 11:58:53 -0000
From: "tip-bot2 for Sven Schnelle" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Sven Schnelle <svens@...ux.ibm.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Oleg Nesterov <oleg@...hat.com>, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: perf/urgent] uprobes: Use kzalloc to allocate xol area

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     e240b0fde52f33670d1336697c22d90a4fe33c84
Gitweb:        https://git.kernel.org/tip/e240b0fde52f33670d1336697c22d90a4fe33c84
Author:        Sven Schnelle <svens@...ux.ibm.com>
AuthorDate:    Tue, 03 Sep 2024 12:23:12 +02:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 03 Sep 2024 16:54:02 +02:00

uprobes: Use kzalloc to allocate xol area

To prevent unitialized members, use kzalloc to allocate
the xol area.

Fixes: b059a453b1cf1 ("x86/vdso: Add mremap hook to vm_special_mapping")
Signed-off-by: Sven Schnelle <svens@...ux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Oleg Nesterov <oleg@...hat.com>
Link: https://lore.kernel.org/r/20240903102313.3402529-1-svens@linux.ibm.com
---
 kernel/events/uprobes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 73cc477..50d7949 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1489,7 +1489,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
 	struct xol_area *area;
 	void *insns;
 
-	area = kmalloc(sizeof(*area), GFP_KERNEL);
+	area = kzalloc(sizeof(*area), GFP_KERNEL);
 	if (unlikely(!area))
 		goto out;
 
@@ -1499,7 +1499,6 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
 		goto free_area;
 
 	area->xol_mapping.name = "[uprobes]";
-	area->xol_mapping.fault = NULL;
 	area->xol_mapping.pages = area->pages;
 	area->pages[0] = alloc_page(GFP_HIGHUSER);
 	if (!area->pages[0])

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ