]> git.karo-electronics.de Git - karo-tx-linux.git/commit
paride: fix potential information leak in pg_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Nov 2011 00:20:09 +0000 (11:20 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 14 Nov 2011 02:58:35 +0000 (13:58 +1100)
commitc295b4e5c7ec41ffedf655f4241e4f370921787d
treef45c438f79389dbc9db148773d029346927b0c73
parent59a7d9144232a5f577d21195989c0bc2b3c56701
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