]> git.kernelconcepts.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>
Tue, 8 Nov 2011 03:15:57 +0000 (14:15 +1100)
commit37842fa33725a90208403560cff35fa439e6bff6
tree97d2ae2c3c06f37266f22ebcbd5cf4604f44ae9a
parente50a2a2a846bc68e433b6ff8f9ff0e1e8090f8be
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