From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCE8BC43381 for ; Tue, 5 Mar 2019 13:19:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6E7320842 for ; Tue, 5 Mar 2019 13:19:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728341AbfCENTg (ORCPT ); Tue, 5 Mar 2019 08:19:36 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40152 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727620AbfCENTf (ORCPT ); Tue, 5 Mar 2019 08:19:35 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x25DERpp077879 for ; Tue, 5 Mar 2019 08:19:34 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2r1r0p5fea-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Mar 2019 08:19:31 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Mar 2019 13:19:06 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 5 Mar 2019 13:19:03 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x25DJ26o43778118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 Mar 2019 13:19:02 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CCA511C04A; Tue, 5 Mar 2019 13:19:02 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6B8D011C04C; Tue, 5 Mar 2019 13:19:01 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.108.119]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Mar 2019 13:19:01 +0000 (GMT) Subject: Re: [PATCH V2 3/4] IMA: Optionally make use of filesystem-provided hashes From: Mimi Zohar To: Matthew Garrett Cc: linux-integrity , Dmitry Kasatkin , linux-fsdevel@vger.kernel.org, miklos@szeredi.hu Date: Tue, 05 Mar 2019 08:18:50 -0500 In-Reply-To: References: <20190226215034.68772-1-matthewgarrett@google.com> <20190226215034.68772-4-matthewgarrett@google.com> <1551369834.10911.195.camel@linux.ibm.com> <1551377110.10911.202.camel@linux.ibm.com> <1551391154.10911.210.camel@linux.ibm.com> <1551731553.10911.510.camel@linux.ibm.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: 8bit X-TM-AS-GCONF: 00 x-cbid: 19030513-4275-0000-0000-000003172186 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19030513-4276-0000-0000-0000382574AD Message-Id: <1551791930.31706.41.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-05_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903050089 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, 2019-03-04 at 14:10 -0800, Matthew Garrett wrote: > On Mon, Mar 4, 2019 at 12:32 PM Mimi Zohar wrote: > > On Mon, 2019-03-04 at 11:52 -0800, Matthew Garrett wrote: > > > To be clear, I'm entirely happy to make this change - I'd just like to > > > ensure that I do it the right way! > > > > Falling back to reading the file is fine. So we're assuming that the > > person signing a policy containing "get_hash" understands the > > ramifications. And yes, only signed policies containing "get_hash" > > should be loaded. > > I'm not clear on why requiring signed policies is helpful here. If you > allow FUSE mounts at all then you need to trust the FUSE filesystem to > return good results, in which case you can trust it to return valid > hashes. If you don't trust the FUSE filesystem then generating the > hash via read doesn't win you anything - the filesystem can return one > set of data on the initial IMA hashing, and then return a second set > later. Requiring signed policy doesn't change that. You're defining a new generic file ops "get_hash", but are using FUSE, a specific filesystem, as an example.  Requiring the IMA policy to be signed when using "get_hash", is proof of the sysadmin's agreement to bypass actually reading and calculating the file hash. Mimi