From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Moore Subject: Re: [PATCH v2] audit: always check the netlink payload length in audit_receive_msg() Date: Tue, 25 Feb 2020 12:59:32 -0500 Message-ID: References: <158265301737.204863.7151355750592428596.stgit@chester> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 987F5F4984 for ; Tue, 25 Feb 2020 17:59:49 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31BA280029A for ; Tue, 25 Feb 2020 17:59:49 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id p14so362416edy.13 for ; Tue, 25 Feb 2020 09:59:45 -0800 (PST) In-Reply-To: <158265301737.204863.7151355750592428596.stgit@chester> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Tue, Feb 25, 2020 at 12:50 PM Paul Moore wrote: > > This patch ensures that we always check the netlink payload length > in audit_receive_msg() before we take any action on the payload > itself. > > Cc: stable@vger.kernel.org > Reported-by: syzbot+399c44bf1f43b8747403@syzkaller.appspotmail.com > Reported-by: syzbot+e4b12d8d202701f08b6d@syzkaller.appspotmail.com > Signed-off-by: Paul Moore > --- > kernel/audit.c | 40 +++++++++++++++++++++------------------- > 1 file changed, 21 insertions(+), 19 deletions(-) Merged into audit/stable-5.6, assuming there are no problems I'll send it up to Linus later this week. -- paul moore www.paul-moore.com 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 50CB4C35E01 for ; Tue, 25 Feb 2020 18:00:01 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03A282176D for ; Tue, 25 Feb 2020 18:00:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AeF/vT1Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03A282176D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582653600; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7EQoTPuUILL3A1cFIEc77ijEVlGzQPVyTWgP3PhRmcc=; b=AeF/vT1QZh6MhE5aXD9Lq19ftOt/Ami8+uL/Clj1VA/yNGYq57g2cEkKVthhqaJIp7VgcM VnY2cfIpuRlw3/oVCB87i9MGdasm+TV6Oe2VIDSsG1qQ4gSHAGP642FXgRRL6icMp2OUvo FqgPjbMMqmPooACKtHRuABTRel4fHzk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-303-U8-36MapPsSjZdhH2FoGwg-1; Tue, 25 Feb 2020 12:59:57 -0500 X-MC-Unique: U8-36MapPsSjZdhH2FoGwg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29CC9800D53; Tue, 25 Feb 2020 17:59:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 123178B759; Tue, 25 Feb 2020 17:59:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D252B18089CD; Tue, 25 Feb 2020 17:59:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01PHxpVA028909 for ; Tue, 25 Feb 2020 12:59:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9C9DEF4974; Tue, 25 Feb 2020 17:59:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 987F5F4984 for ; Tue, 25 Feb 2020 17:59:49 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31BA280029A for ; Tue, 25 Feb 2020 17:59:49 +0000 (UTC) Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-m--NV69sMP-Lv_JaB7SR3w-1; Tue, 25 Feb 2020 12:59:46 -0500 X-MC-Unique: m--NV69sMP-Lv_JaB7SR3w-1 Received: by mail-ed1-f67.google.com with SMTP id p14so362416edy.13 for ; Tue, 25 Feb 2020 09:59:45 -0800 (PST) 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; bh=m7LIyS2zVnyr4ZIKBfFkvlCDgTjsltYHrTVVC1cvZ6c=; b=TshY1VgGhj9RLY8Eel+My5u8uL5Hv4Y/asHoIkqkSwnhwrC1MxjM7r530cSkTf3fWu T5RC2OQZ71K4luv8XaNtyeu4MmzsyVDCX3rINajS5wy210tu7E0pPPDMKpQBP/ediYbb xDjTDN6OnEHuw2wxR9NwQJ1BP+TWlFRy3H8ampbsMdUiE2FFPSEKexBAoKMELWyBJDOZ rsfSInvf4PA5uv8+yoeE6gbhXHBMKneApBj4PkSv9sjHanLhaY5QUxSA/cQDZrDynWN/ 28LNDTBwI59eachKIwkIlwWIsqbmvErmpG3u62eLSqswPK7cmEgM0p+1G+3CNRot6Avx dGig== X-Gm-Message-State: APjAAAVwEI2gFlWGHOgXKghxQYEf0oJcZIOu55cf7KttAPkLaZLHL8yD P+Z0qPiw6DZA3ihCj4wKqmEQkzeNAdy1YQj8PNKtWsHdUQ== X-Google-Smtp-Source: APXvYqx5zrq4sDR8ZxypEw+XvZViO5mJe09ZXFqrcKvIzpW4C8z2aKk1T+6lFdHx5Mv37YtsjJ1Ge8ioS0Ydlvvun+M= X-Received: by 2002:a17:906:c299:: with SMTP id r25mr382441ejz.272.1582653584503; Tue, 25 Feb 2020 09:59:44 -0800 (PST) MIME-Version: 1.0 References: <158265301737.204863.7151355750592428596.stgit@chester> In-Reply-To: <158265301737.204863.7151355750592428596.stgit@chester> From: Paul Moore Date: Tue, 25 Feb 2020 12:59:32 -0500 Message-ID: Subject: Re: [PATCH v2] audit: always check the netlink payload length in audit_receive_msg() To: linux-audit@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 01PHxpVA028909 X-loop: linux-audit@redhat.com X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <20200225175932.7bIzTMnQf28eDNyOLxiAJInoVRn1rxZIIonxrZf-7ck@z> On Tue, Feb 25, 2020 at 12:50 PM Paul Moore wrote: > > This patch ensures that we always check the netlink payload length > in audit_receive_msg() before we take any action on the payload > itself. > > Cc: stable@vger.kernel.org > Reported-by: syzbot+399c44bf1f43b8747403@syzkaller.appspotmail.com > Reported-by: syzbot+e4b12d8d202701f08b6d@syzkaller.appspotmail.com > Signed-off-by: Paul Moore > --- > kernel/audit.c | 40 +++++++++++++++++++++------------------- > 1 file changed, 21 insertions(+), 19 deletions(-) Merged into audit/stable-5.6, assuming there are no problems I'll send it up to Linus later this week. -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit