From: Guillaume Nault Date: Mon, 14 Mar 2016 20:17:16 +0000 (+0100) Subject: ppp: ensure file->private_data can't be overridden X-Git-Tag: v3.2.80~76 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4391ae144e76c324e842cdb61c4dde74c332eaf;p=pandora-kernel.git ppp: ensure file->private_data can't be overridden commit e8e56ffd9d2973398b60ece1f1bebb8d67b4d032 upstream. Locking ppp_mutex must be done before dereferencing file->private_data, otherwise it could be modified before ppp_unattached_ioctl() takes the lock. This could lead ppp_unattached_ioctl() to override ->private_data, thus leaking reference to the ppp_file previously pointed to. v2: lock all ppp_ioctl() instead of just checking private_data in ppp_unattached_ioctl(), to avoid ambiguous behaviour. Fixes: f3ff8a4d80e8 ("ppp: push BKL down into the driver") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed