From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933486AbcFGV7B (ORCPT ); Tue, 7 Jun 2016 17:59:01 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33679 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933341AbcFGV5N (ORCPT ); Tue, 7 Jun 2016 17:57:13 -0400 From: Kees Cook To: kernel-hardening@lists.openwall.com Cc: Kees Cook , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Jiri Slaby , Guenter Roeck , linux-kernel@vger.kernel.org Subject: [PATCH 0/5] lkdtm: add usercopy and rodata, fix atomic Date: Tue, 7 Jun 2016 14:57:03 -0700 Message-Id: <1465336628-18219-1-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds several new tests to lkdtm. To test non-executability of .rodata, lkdtm's build method shifted around a bit requiring a source file rename. But after some objcopy magic, there is now an architecture-agnostic way to write functions into .rodata. The atomic under/overflow test was split so that each case could be individually tested. The biggest addition are the usercopy tests (in preparation for CONFIG_HARDENED_USERCOPY, based on grsecurity/PaX's PAX_USERCOPY). This tests both directions (copy_to_from, copy_from_user) of the three error conditions that are checked for: wrong object size, wrong stack frame, and wrong object markings. Unless anyone has blocking comments, I'll send a pull to Greg for this to land in -next soon. -Kees From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com From: Kees Cook Date: Tue, 7 Jun 2016 14:57:03 -0700 Message-Id: <1465336628-18219-1-git-send-email-keescook@chromium.org> Subject: [kernel-hardening] [PATCH 0/5] lkdtm: add usercopy and rodata, fix atomic To: kernel-hardening@lists.openwall.com Cc: Kees Cook , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Jiri Slaby , Guenter Roeck , linux-kernel@vger.kernel.org List-ID: This adds several new tests to lkdtm. To test non-executability of .rodata, lkdtm's build method shifted around a bit requiring a source file rename. But after some objcopy magic, there is now an architecture-agnostic way to write functions into .rodata. The atomic under/overflow test was split so that each case could be individually tested. The biggest addition are the usercopy tests (in preparation for CONFIG_HARDENED_USERCOPY, based on grsecurity/PaX's PAX_USERCOPY). This tests both directions (copy_to_from, copy_from_user) of the three error conditions that are checked for: wrong object size, wrong stack frame, and wrong object markings. Unless anyone has blocking comments, I'll send a pull to Greg for this to land in -next soon. -Kees