[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#307552: CAN-2005-1369: DoS through user-writable sysfs nodes in it87 and via686a drivers



Package: kernel-source-2.6.8
Severity: important
Tags: security

CAN-2005-1369:

<khali@linux-fr.org>
        [PATCH] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers

        The it87 and via686a hardware monitoring drivers each create a sysfs
        file named "alarms" in R/W mode, while they should really create it in
        read-only mode. Since we don't provide a store function for these files,
        write attempts to these files will do something undefined (I guess) and
        bad (I am sure). My own try resulted in a locked terminal (where I
        attempted the write) and a 100% CPU load until next reboot.

        As a side note, wouldn't it make sense to check, when creating sysfs
        files, that readable files have a non-NULL show method, and writable
        files have a non-NULL store method? I know drivers are not supposed to
        do stupid things, but there is already a BUG_ON for several conditions
        in sysfs_create_file, so maybe we could add two more?

        Signed-off-by: Jean Delvare <khali@linux-fr.org>
        Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

The fix is part of the 2.6.11.8 patch series:
www.kernel.org/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.6%2Fincr%2Fpatch-2.6.11.7-8.bz2;z=10
www.kernel.org/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.6%2Fincr%2Fpatch-2.6.11.7-8.bz2;z=9n

Cheers,
        Moritz

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=de_DE.ISO-8859-15@euro (charmap=ISO-8859-15)



Reply to: