Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5266617ybl; Wed, 22 Jan 2020 13:32:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyoRvIgctqlmiKyCMeLUfla2kSuNPX4jgk6LT5wm6HufWdUDyKCSP6U4idZQBkVIeUQHX0p X-Received: by 2002:a9d:6849:: with SMTP id c9mr9337760oto.206.1579728757642; Wed, 22 Jan 2020 13:32:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579728757; cv=none; d=google.com; s=arc-20160816; b=Mrq7iVJ3QBV0t+rM9axmGgJLLmFl3FRyoNzxfG8XEwLyC/wBxBt8rDHQtUksETdsJZ SuoO9OYpWTcYEX+8cPYzySLPxSrK2mYNYS8Amt0hZYHIzMtEeBc2Xn3dANe+wQ9kn4oq ctSvythHIBFBDDH0pYkJsEfe9pxhmeYu8Akhx1mAL4WPdx5P3qGfnGOL5sSZeTz1wyXs C7h3vSg0WA+7oybubD5tBba8QEiJFbhEs+lGqfaWNkib1T8f1d1HwA085jcsKlyrGtG+ WPXh949lR9BhgDQMQmkpW981vv/YbTZ/PsNKtFrXFdojwXcuDlOjaLmd5kqKGb6OtNGP a1iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=T8dyZsx/1G1o4Km+D3AEjaFYjcDXoKwu76FXwqPPMog=; b=uH3LVipWLbcj1hehI5hXbSQqjTMXh1c91htwOO5XMiopeI4dV3La5nsL0aBcHdRKOt H/N1guPeSwED/16narpT815zGLRSIc+2I5CGMBCf3ewsh/+egTbT1mp+wF9dp8qzhxgb 0KyNM18hJ4XTcpWlKGL6WB3jahuFCXON32foBfCijMMLmjhBKdiJATb3Y6XuLWcl8Bv5 xT+iYALeX1Smv89dS1BT/8elZnZPtHQ+wNevN6EDLQCA8n90M654czhqGBJ9iwrGKNOI lzix6WeKMFOhbQ8BB0W4Z/0xarWaesrjTdfGprPc2Xe2NuwlNWy5j3jf4e3ExmXQCsjp aZmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=VJNm7ixV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si20746316oig.91.2020.01.22.13.32.21; Wed, 22 Jan 2020 13:32:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=VJNm7ixV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729442AbgAVV3j (ORCPT + 99 others); Wed, 22 Jan 2020 16:29:39 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:39209 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729420AbgAVV3g (ORCPT ); Wed, 22 Jan 2020 16:29:36 -0500 Received: by mail-lf1-f65.google.com with SMTP id y1so724084lfb.6 for ; Wed, 22 Jan 2020 13:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T8dyZsx/1G1o4Km+D3AEjaFYjcDXoKwu76FXwqPPMog=; b=VJNm7ixVgyAguIeuR1pIXq0hv6ch7qgz5+W7axDIdGlhCNwpeyNJplyxY1npsTRa4q 3AvFO2bN5r9I/mbrHMKFriPmjMXEUWYzS+PN/eLwCoaJhzX3jbPQJyRrX+O6IifhmS4t bAW5ztBvjxYTbpp9vIw4qcfvCMDSpuT8XuKqnlkWEusBikGN7eK6zxIwb+ANo0MusAUH y+2kEafA7mRzCvr0s6iDXqOBMqy0gyMtoVIoPF3UpKq+lYrO5MoIoGFloRBeyZfAnJAY cqsdx7KP8XS8YRJxgBSf+GmUDq5DSAoNnh1r2nnWw3k0ufdHWJw6q2xH0VYZhZTHi5df rQRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T8dyZsx/1G1o4Km+D3AEjaFYjcDXoKwu76FXwqPPMog=; b=sk6GOAFdMaSMsuVa6T8KlRfhONRRWjhDHUD5MBK0hukuuPGwLh50uqMST2iF1swiBT +FzpfEzLIKRIdmPBbx7YvB2PTImhCfvcdEZcI5anqcvY0b42UoJeqPKc+9Es5F8Hl/XA TlwABz3fBq1xfJKiHTrUfJlYHIEBi+s1mIcnQlYlA0GJTID9B9j2RXN1GclKrPKWKIgQ QmS1vHX1PN+327PmAKcCp2ZIAiOTBhmCAX/k0QRbXqfw7zhnWE35FyuX4lQjP3sVu+1G hOFPdEQTAIVdCJpy0jDCj9zyhBLIUmv2oODqREjzgpq/JY/s1+OPHw3s75WPIfXHZd2N jRMQ== X-Gm-Message-State: APjAAAUtawxkXhYpiokGRV5MSGpey9Zr1Sdfwr90iEaWJVkpWo4ejUSD 3d1pgOWoY9QrwKFCnIfyBa17E4jkpew3sS5y0BgU X-Received: by 2002:ac2:4422:: with SMTP id w2mr2853088lfl.178.1579728573496; Wed, 22 Jan 2020 13:29:33 -0800 (PST) MIME-Version: 1.0 References: <28cf3e16f8440bcb852767d3ae13e1a56c19569c.1577736799.git.rgb@redhat.com> In-Reply-To: <28cf3e16f8440bcb852767d3ae13e1a56c19569c.1577736799.git.rgb@redhat.com> From: Paul Moore Date: Wed, 22 Jan 2020 16:29:22 -0500 Message-ID: Subject: Re: [PATCH ghak90 V8 14/16] audit: check contid depth and add limit config param To: Richard Guy Briggs Cc: containers@lists.linux-foundation.org, linux-api@vger.kernel.org, Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, LKML , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, sgrubb@redhat.com, omosnace@redhat.com, dhowells@redhat.com, simo@redhat.com, Eric Paris , Serge Hallyn , ebiederm@xmission.com, nhorman@tuxdriver.com, Dan Walsh , mpatel@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 31, 2019 at 2:51 PM Richard Guy Briggs wrote: > > Clamp the depth of audit container identifier nesting to limit the > netlink and disk bandwidth used and to prevent losing information from > record text size overflow in the contid field. > > Add a configuration parameter AUDIT_STATUS_CONTID_DEPTH_LIMIT (0x80) to > set the audit container identifier depth limit. This can be used to > prevent overflow of the contid field in CONTAINER_OP and CONTAINER_ID > messages, losing information, and to limit bandwidth used by these > messages. > > Signed-off-by: Richard Guy Briggs > --- > include/uapi/linux/audit.h | 2 ++ > kernel/audit.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ > kernel/audit.h | 2 ++ > 3 files changed, 50 insertions(+) Since setting an audit container ID, and hence acting as an orchestrator and creating a new nested level of audit container IDs, is a privileged operation I think we can equate this to the infamous "shooting oneself in the foot" problem. Let's leave this limitation out of the patchset for now, if it becomes a problem in the future we can consider restricting the nesting depth. -- paul moore www.paul-moore.com