1. 01 May, 2006 6 commits
  2. 24 Apr, 2006 25 commits
  3. 19 Apr, 2006 2 commits
    • Greg Kroah-Hartman's avatar
      Linux 2.6.16.9 · 9d395d19
      Greg Kroah-Hartman authored
      9d395d19
    • Andi Kleen's avatar
      [PATCH] i386/x86-64: Fix x87 information leak between processes (CVE-2006-1056) · 7466f9e7
      Andi Kleen authored
      AMD K7/K8 CPUs only save/restore the FOP/FIP/FDP x87 registers in FXSAVE
      when an exception is pending.  This means the value leak through context
      switches and allow processes to observe some x87 instruction state of
      other processes.
      
      This was actually documented by AMD, but nobody recognized it as being
      different from Intel before.
      
      The fix first adds an optimization: instead of unconditionally calling
      FNCLEX after each FXSAVE test if ES is pending and skip it when not
      needed. Then do a x87 load from a kernel variable to clear FOP/FIP/FDP.
      
      This means other processes always will only see a constant value defined
      by the kernel in their FP state.
      
      I took some pain to make sure to chose a variable that's already in L1
      during context switch to make the overhead of this low.
      
      Also alternative() is used to patch away the new code on CPUs who don't
      need it.
      
      Patch for both i386/x86-64.
      
      The problem was discovered originally by Jan Beulich. Richard Brunner
      provided the basic code for the workarounds, with contribution from Jan.
      
      This is CVE-2006-1056
      
      Cc: richard.brunner@amd.com
      Cc: jbeulich@novell.com
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7466f9e7
  4. 18 Apr, 2006 2 commits
  5. 17 Apr, 2006 5 commits
    • Greg Kroah-Hartman's avatar
      Linux 2.6.16.7 · 54e5705f
      Greg Kroah-Hartman authored
      54e5705f
    • Hugh Dickins's avatar
      [PATCH] fix MADV_REMOVE vulnerability (CVE-2006-1524 for real this time) · 00ec474c
      Hugh Dickins authored
      madvise_remove needs to respect file and mmap protections.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      00ec474c
    • Greg Kroah-Hartman's avatar
      Linux 2.6.16.6 · 37863c8a
      Greg Kroah-Hartman authored
      37863c8a
    • Hugh Dickins's avatar
      [PATCH] shmat: stop mprotect from giving write permission to a readonly attachment (CVE-2006-1524) · 512dba41
      Hugh Dickins authored
      I found that all of 2.4 and 2.6 have been letting mprotect give write
      permission to a readonly attachment of shared memory, whether or not IPC
      would give the caller that permission.
      
      SUS says "The behaviour of this function [mprotect] is unspecified if the
      mapping was not established by a call to mmap", but I don't think we can
      interpret that as allowing it to subvert IPC permissions.
      
      I haven't tried 2.2, but the 2.2.26 source looks like it gets it right; and
      the patch below reproduces that behaviour - mprotect cannot be used to add
      write permission to a shared memory segment attached readonly.
      
      This patch is simple, and I'm sure it's what we should have done in 2.4.0:
      if you want to go on to switch write permission on and off with mprotect,
      just don't attach the segment readonly in the first place.
      
      However, we could have accumulated apps which attach readonly (even though
      they would be permitted to attach read/write), and which subsequently use
      mprotect to switch write permission on and off: it's not unreasonable.
      
      I was going to add a second ipcperms check in do_shmat, to check for
      writable when readonly, and if not writable find_vma and clear VM_MAYWRITE.
       But security_ipc_permission might do auditing, and it seems wrong to
      report an attempt for write permission when there has been none.  Or we
      could flag the vma as SHM, note the shmid or shp in vm_private_data, and
      then get mprotect to check.
      
      But the patch below is a lot simpler: I'd rather stick with it, if we can
      convince ourselves somehow that it'll be safe.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      512dba41
    • Stephen Hemminger's avatar
      [PATCH] atm: clip causes unregister hang · 23e0ac04
      Stephen Hemminger authored
      If Classical IP over ATM module is loaded, its neighbor table gets
      populated when permanent neighbor entries are created; but these entries
      are not flushed when the device is removed. Since the entry never gets
      flushed the unregister of the network device never completes.
      
      This version of the patch also adds locking around the reference to
      the atm arp daemon to avoid races with events and daemon state changes.
      (Note: barrier() was never really safe)
      
      Bug-reference: http://bugzilla.kernel.org/show_bug.cgi?id=6295Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      23e0ac04