Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1731987ybt; Thu, 25 Jun 2020 12:43:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG7QaL/Pq0TyE2ZO2zMYY2/HzU3flWdxy/G0+twywnhAGnNlecY8AZxepZn9dB9vDAEksW X-Received: by 2002:a17:907:1051:: with SMTP id oy17mr10743357ejb.394.1593114180053; Thu, 25 Jun 2020 12:43:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593114180; cv=none; d=google.com; s=arc-20160816; b=S9AL7XI2eaDatxjpmO2w14qX0nxwvsK6xZgSPchLGZTjBPcTuDTjTrH9USVum1agug aJcv7hNZOjrIkwTXzaWjD8/ivbzCVaHJjP2KJq8oKPk/s+8uh0EtOmab50ai0JPCquI0 RgWGnvgmA1sHEBMe1Cr/Sh//NsjbtmTfbmkjbg639G5hFky8rD/yUFCCOuy3hNV5Y1TP AWZJlKOuDiusjSz+/46Y6cBkYcjAlkqW3ZyGBiYqyEtSQ9tOKLyfvsaMLof27dw/cPwN 5gLT3I2yW9/F0FNPkBhX3aAKbqv3VTnFrNoonKtmxJynKlI5QejT4HlW1k11ZgEOuJAI CEcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=RznwMX47jEh/IoSbSs8nl1ctlAv/0jmIbX/4oU0o6/U=; b=fgAg8j94+mcMgtG0iYfLgt9xjv7OBH/PmYN1YWLqSP5ud09xh7n+i9YW6bnqrwfcRO i028Ew9dZrRvqagSo1qZcbkn2ckqxbdNLBTCKIWd5YzDKVZ7y2rPBJGFz1zUuE4xcpdY V04r3P/XM1UvR3hKw62RkV9AGnmKAIM/45dpHu0sKNrPffkEJ8nnyxIQZIpxqDiOv83u j8aZh/NikCLh/o7gZSPZ4nwmkQlzVFtu68n4ANeWRSDTFUqSTUWBlXUt4Z+BU1VklgfF qyWp4MGO/UNUpciZuPXacnKqh3p6MBu3v3vqKS9m0rpCO3bahHwmWn8eREv5nXJCQ3hO 5b9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z89si1010357ede.516.2020.06.25.12.42.20; Thu, 25 Jun 2020 12:43:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406740AbgFYTl4 (ORCPT + 99 others); Thu, 25 Jun 2020 15:41:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40002 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406069AbgFYTlz (ORCPT ); Thu, 25 Jun 2020 15:41:55 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PJUuEr101700; Thu, 25 Jun 2020 15:41:51 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vvkxmgcx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 15:41:51 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PJUwjO101945; Thu, 25 Jun 2020 15:41:50 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vvkxmgcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 15:41:50 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PJel7w002109; Thu, 25 Jun 2020 19:41:48 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 31uus526bp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 19:41:48 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PJeR4Z52822498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 19:40:27 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7837A11C04C; Thu, 25 Jun 2020 19:41:46 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BB5711C054; Thu, 25 Jun 2020 19:41:44 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.142.225]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 19:41:44 +0000 (GMT) Message-ID: <1593114103.27152.346.camel@linux.ibm.com> Subject: Re: [PATCH 01/12] ima: Have the LSM free its audit rule From: Mimi Zohar To: Tyler Hicks , Dmitry Kasatkin Cc: James Morris , "Serge E . Hallyn" , Lakshmi Ramasubramanian , Prakhar Srivastava , linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Janne Karhunen Date: Thu, 25 Jun 2020 15:41:43 -0400 In-Reply-To: <20200623003236.830149-2-tyhicks@linux.microsoft.com> References: <20200623003236.830149-1-tyhicks@linux.microsoft.com> <20200623003236.830149-2-tyhicks@linux.microsoft.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-25_15:2020-06-25,2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 phishscore=0 cotscore=-2147483648 spamscore=0 mlxlogscore=999 suspectscore=2 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250113 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-06-22 at 19:32 -0500, Tyler Hicks wrote: > Ask the LSM to free its audit rule rather than directly calling kfree(). > Both AppArmor and SELinux do additional work in their audit_rule_free() > hooks. Fix memory leaks by allowing the LSMs to perform necessary work. > > Fixes: b16942455193 ("ima: use the lsm policy update notifier") > Signed-off-by: Tyler Hicks > Cc: Janne Karhunen Reviewed-by: Mimi Zohar