Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703145

drivers/s390/char/keyboard.c kernel stack infoleak

From sohu0106 <sohu0106@126.com>
Newsgroups linux.kernel
Subject drivers/s390/char/keyboard.c kernel stack infoleak
Date 2017-08-03 16:00 +0200
Message-ID <uaoPn-Jx-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The stack object "kbdiacr" has a total size of 4 bytes. Its last 1 bytes are padding bytes after "result" which are not initialized and leaked to userland via "copy_to_user".


diff --git a/keyboard.c b/keyboard.c
index ba0e4f9..76a6d35 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -480,6 +480,8 @@ int kbd_ioctl(struct kbd_data *kbd, unsigned int cmd, unsigned long arg)
                struct kbdiacr diacr;
                int i;
 
+               memset( &diacr, 0, sizeof(struct kbdiacr) );
+
                if (put_user(kbd->accent_table_size, &a->kb_cnt))
                        return -EFAULT;
                for (i = 0; i < kbd->accent_table_size; i++) {

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

drivers/s390/char/keyboard.c kernel stack infoleak sohu0106 <sohu0106@126.com> - 2017-08-03 16:00 +0200
  Re: drivers/s390/char/keyboard.c kernel stack infoleak Thomas Huth <huth@tuxfamily.org> - 2017-08-04 11:10 +0200
    Re: drivers/s390/char/keyboard.c kernel stack infoleak Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-08-04 11:30 +0200
      Re: drivers/s390/char/keyboard.c kernel stack infoleak Thomas Huth <huth@tuxfamily.org> - 2017-08-05 09:20 +0200

csiph-web