Skip to contentSkip to conversation

fix infoleak in fcntl

PATCH In review Kangjie Lu 3 participants 3 messages May 3, 2016 – May 8, 2016

Subsystems (2)
lore
Share & tools
lore

Kangjie Lu

author
#0 lore raw

PATCH 1/1 fix infoleak in fcntl

The stack object “si” has a total size of 128 bytes; however, only 16 bytes are initialized. The remaining uninitialized bytes are sent to userland via send_signal.

---
 fs/fcntl.c | 1 +
 1 file changed, 1 insertion(+)
fs/fcntl.c +1 -0
index 350a2c8..d06f943 100644
@@ -468,6 +468,7 @@ static void send_sigio_to_task(struct task_struct *p,
 			   delivered even if we can't queue.  Failure to
 			   queue in this case _should_ be reported; we fall
 			   back to SIGIO in that case. --sct */
+			memset(&si, 0, sizeof(si));
 			si.si_signo = signum;
 			si.si_errno = 0;
 		        si.si_code  = reason;
Signature · 1 line
1.9.1
#2 lore raw
In reply to Kangjie Lu
Quoted 3 lines · Kangjie Lu

The stack object “si” has a total size of 128 bytes; however, only 16 bytes are initialized. The remaining uninitialized bytes are sent to userland via send_signal.

How did you find all these leaks?
Since you sent more than one patch I guess you used some tool, which one?

Signature · 2 lines
Thanks,
//richard