afs: Use correct output buffer for FSCmd pioctl
authorAndrew Deason <adeason@sinenomine.net>
Wed, 8 Jul 2015 18:20:13 +0000 (14:20 -0400)
committerDaria Brashear <shadow@your-file-system.com>
Wed, 29 Jul 2015 22:25:17 +0000 (18:25 -0400)
MRAFS added the FsCmd pioctl for passing messages to the fileserver;
a bug causes it to write into the wrong memory and potentially panic
clients.

FIXES 131896 (CVE-2015-3285)

Change-Id: Ic3a81fe06edc886f24bbc0537ea53e994b086c9e

src/afs/afs_pioctl.c

index 7cdc075..917296a 100644 (file)
@@ -5065,8 +5065,7 @@ DECL_PIOCTL(PFsCmd)
            if (tc) {
                RX_AFS_GUNLOCK();
                code =
-                   RXAFS_FsCmd(rxconn, Fid, Inputs,
-                                       (struct FsCmdOutputs *)aout);
+                   RXAFS_FsCmd(rxconn, Fid, Inputs, Outputs);
                RX_AFS_GLOCK();
            } else
                code = -1;