]> git.karo-electronics.de Git - karo-tx-linux.git/commit
paride: fix potential information leak in pg_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 24 Oct 2011 14:53:54 +0000 (01:53 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 4 Nov 2011 04:48:16 +0000 (15:48 +1100)
commit9f604bccc37e24aad105ec6ee09adabb50a9143a
tree69f0f7ba71f062bae95dd583da7de63279f21476
parent7513fb962a608b7b537ba5a482cb6699634cfa78
paride: fix potential information leak in pg_read()

Smatch has a new check for Rosenberg type information leaks where structs
are copied to the user with uninitialized stack data in them.  i In this
case, the pg_write_hdr struct has a hole in it.

struct pg_write_hdr {
        char                       magic;                /*     0     1 */
        char                       func;                 /*     1     1 */
        /* XXX 2 bytes hole, try to pack */
        int                        dlen;                 /*     4     4 */

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/paride/pg.c