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:   Tue, 15 Jan 2019 17:36:08 +0100
From:   Greg Kroah-Hartman <>
Cc:     Greg Kroah-Hartman <>,, Shakeel Butt <>,
        Michal Hocko <>,
        Rik van Riel <>,
        Roman Gushchin <>,
        Johannes Weiner <>,
        Tejun Heo <>,
        Andrew Morton <>,
        Linus Torvalds <>
Subject: [PATCH 4.20 27/57] fork, memcg: fix cached_stacks case

4.20-stable review patch.  If anyone has any objections, please let me know.


From: Shakeel Butt <>

commit ba4a45746c362b665e245c50b870615f02f34781 upstream.

Commit 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on
memcg charge fail") fixes a crash caused due to failed memcg charge of
the kernel stack.  However the fix misses the cached_stacks case which
this patch fixes.  So, the same crash can happen if the memcg charge of
a cached stack is failed.

Fixes: 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on memcg charge fail")
Signed-off-by: Shakeel Butt <>
Acked-by: Michal Hocko <>
Acked-by: Rik van Riel <>
Cc: Rik van Riel <>
Cc: Roman Gushchin <>
Cc: Johannes Weiner <>
Cc: Tejun Heo <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Greg Kroah-Hartman <>

 kernel/fork.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -221,6 +221,7 @@ static unsigned long *alloc_thread_stack
 		memset(s->addr, 0, THREAD_SIZE);
 		tsk->stack_vm_area = s;
+		tsk->stack = s->addr;
 		return s->addr;

Powered by blists - more mailing lists