From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755142AbcHVUvb (ORCPT ); Mon, 22 Aug 2016 16:51:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40380 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754786AbcHVUva (ORCPT ); Mon, 22 Aug 2016 16:51:30 -0400 From: Mateusz Guzik To: Konstantin Khlebnikov , Richard Guy Briggs Cc: ebiederm@xmission.com, oleg@redhat.com, sgrubb@redhat.com, pmoore@redhat.com, eparis@redhat.com, luto@amacapital.net, linux-audit@redhat.com, linux-kernel@vger.kernel.org, Al Viro Subject: [PATCH 0/2] introduce get_task_exe_file and use it to fix audit_exe_compare Date: Mon, 22 Aug 2016 22:51:21 +0200 Message-Id: <1471899083-7937-1-git-send-email-mguzik@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 22 Aug 2016 20:51:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org audit_exe_compare directly accesses mm->exe_file without making sure the object is stable. Fixing it using current primitives results in partially duplicating what proc_exe_link is doing. As such, introduce a trivial helper which can be used in both places and fix the func. Mateusz Guzik (2): mm: introduce get_task_exe_file audit: fix exe_file access in audit_exe_compare fs/proc/base.c | 7 +------ include/linux/mm.h | 1 + kernel/audit_watch.c | 8 +++++--- kernel/fork.c | 24 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 9 deletions(-) -- 1.8.3.1