1. Jan 22, 2019
  2. Jan 18, 2019
  3. Jan 13, 2019
  4. Jan 10, 2019
    • Greg Kroah-Hartman's avatar
      Merge tag 'lkdtm-next' of... · a2915698
      Greg Kroah-Hartman authored
      Merge tag 'lkdtm-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into char-misc-next
      
      Kees writes:
      
      lkdtm updates and new tests
      
      - Check NULL dereferences (Christophe Leroy)
      - Print real addresses for debugging (Christophe Leroy)
      - Drop CONFIG_BLOCK dependency
      
      * tag 'lkdtm-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        lkdtm: Add tests for NULL pointer dereference
        lkdtm: Print real addresses
        lkdtm: Do not depend on BLOCK and clean up headers
      a2915698
    • Christophe Leroy's avatar
      lkdtm: Add tests for NULL pointer dereference · 59a12205
      Christophe Leroy authored
      
      
      Introduce lkdtm tests for NULL pointer dereference: check access or exec
      at NULL address, since these errors tend to be reported differently from
      the general fault error text. For example from x86:
      
          pr_alert("BUG: unable to handle kernel %s at %px\n",
              address < PAGE_SIZE ? "NULL pointer dereference" : "paging request",
              (void *)address);
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      59a12205
    • Christophe Leroy's avatar
      lkdtm: Print real addresses · 4c411157
      Christophe Leroy authored
      
      
      Today, when doing a lkdtm test before the readiness of the
      random generator, (ptrval) is printed instead of the address
      at which it perform the fault:
      
      [ 1597.337030] lkdtm: Performing direct entry EXEC_USERSPACE
      [ 1597.337142] lkdtm: attempting ok execution at (ptrval)
      [ 1597.337398] lkdtm: attempting bad execution at (ptrval)
      [ 1597.337460] kernel tried to execute user page (77858000) -exploit attempt? (uid: 0)
      [ 1597.344769] Unable to handle kernel paging request for instruction fetch
      [ 1597.351392] Faulting instruction address: 0x77858000
      [ 1597.356312] Oops: Kernel access of bad area, sig: 11 [#1]
      
      If the lkdtm test is done later on, it prints an hashed address.
      
      In both cases this is pointless. The purpose of the test is to
      ensure the kernel generates an Oops at the expected address,
      so real addresses needs to be printed. This patch fixes that.
      
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      4c411157