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-next>] [day] [month] [year] [list]
Date:   Fri, 8 Sep 2017 13:43:51 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Frederic Weisbecker <fweisbec@...il.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] tsacct: Fix a truncation bug in taskstats

The KB_MASK is used to hide the low bits which prevent an information
leak about keyboard timing etc.  The problem is that it's a 32 bit mask
instead of 64 bits so it zeroes out the high 32 bits as well.

Fixes: 58c3c3aa01b4 ("Make taskstats round statistics down to nearest 1k bytes/events")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/kernel/tsacct.c b/kernel/tsacct.c
index 370724b45391..ea9375c94126 100644
--- a/kernel/tsacct.c
+++ b/kernel/tsacct.c
@@ -87,7 +87,7 @@ void bacct_add_tsk(struct user_namespace *user_ns,
 
 #define KB 1024
 #define MB (1024*KB)
-#define KB_MASK (~(KB-1))
+#define KB_MASK (~((u64)KB-1))
 /*
  * fill in extended accounting fields
  */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ