1. 09 Jan, 2007 34 commits
  2. 04 Jan, 2007 6 commits
    • Linus Torvalds's avatar
      i386: save/restore eflags in context switch (CVE-2006-5173) · 09d9056c
      Linus Torvalds authored
      (And reset it on new thread creation)
      
      It turns out that eflags is important to save and restore not just
      because of iopl, but due to the magic bits like the NT bit, which we
      don't want leaking between different threads.
      
      Backported to 2.6.16 by Chuck Ebbert <76306.1226@compuserve.com>
      [Backport consisted of removing the CFI annotations.]
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      09d9056c
    • Marcel Holtmann's avatar
      Call init_timer() for ISDN PPP CCP reset state timer (CVE-2006-5749) · bb3e712f
      Marcel Holtmann authored
      The function isdn_ppp_ccp_reset_alloc_state() sets ->timer.function
      and ->timer.data and later on calls add_timer() with no init_timer()
      ever done.
      
      Noted by Al Viro.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      bb3e712f
    • Linus Torvalds's avatar
      Fix incorrect user space access locking in mincore() (CVE-2006-4814) · 7c876d45
      Linus Torvalds authored
      Doug Chapman noticed that mincore() will doa "copy_to_user()" of the
      result while holding the mmap semaphore for reading, which is a big
      no-no.  While a recursive read-lock on a semaphore in the case of a page
      fault happens to work, we don't actually allow them due to deadlock
      schenarios with writers due to fairness issues.
      
      Doug and Marcel sent in a patch to fix it, but I decided to just rewrite
      the mess instead - not just fixing the locking problem, but making the
      code smaller and (imho) much easier to understand.
      
      Also included are two fixes for the original patch including one
      by Oleg Nesterov.
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      7c876d45
    • Miklos Szeredi's avatar
      fuse: fix hang on SMP · 571525bb
      Miklos Szeredi authored
      Fuse didn't always call i_size_write() with i_mutex held which caused
      rare hangs on SMP/32bit.  This bug has been present since fuse-2.2,
      well before being merged into mainline.
      
      The simplest solution is to protect i_size_write() with the
      per-connection spinlock.  Using i_mutex for this purpose would require
      some restructuring of the code and I'm not even sure it's always safe
      to acquire i_mutex in all places i_size needs to be set.
      
      Since most of vmtruncate is already duplicated for other reasons,
      duplicate the remaining part as well, making all i_size_write() calls
      internal to fuse.
      
      Using i_size_write() was unnecessary in fuse_init_inode(), since this
      function is only called on a newly created locked inode.
      
      Reported by a few people over the years, but special thanks to Dana
      Henriksen who was persistent enough in helping me debug it.
      
      Adrian Bunk:
      Backported to 2.6.16.
      Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      571525bb
    • Robert Olsson's avatar
      [PKTGEN]: Fix module load/unload races. · e79366b5
      Robert Olsson authored
      Adrian Bunk:
      Backported to 2.6.16.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      e79366b5
    • Dirk Eibach's avatar
      i2c: fix broken ds1337 initialization · 51b73a03
      Dirk Eibach authored
      On a custom board with ds1337 RTC I found that upgrade from 2.6.15 to
      2.6.18 broke RTC support.
      
      The main problem are changes to ds1337_init_client().
      When a ds1337 recognizes a problem (e.g. power or clock failure) bit 7
      in status register is set. This has to be reset by writing 0 to status
      register. But since there are only 16 byte written to the chip and the
      first byte is interpreted as an address, the status register (which is
      the 16th) is never written.
      The other problem is, that initializing all registers to zero is not
      valid for day, date and month register. Funny enough this is checked by
      ds1337_detect(), which depends on this values not being zero. So then
      treated by ds1337_init_client() the ds1337 is not detected anymore,
      whereas the failure bit in the status register is still set.
      
      Broken by commit f9e89579 (2.6.16-rc1,
      2006-01-06). This fix is in Linus' tree since 2.6.20-rc1 (commit
      763d9c04).
      Signed-off-by: default avatarDirk Stieler <stieler@gdsys.de>
      Signed-off-by: default avatarDirk Eibach <eibach@gdsys.de>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      51b73a03