Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1661400pxb; Mon, 23 Aug 2021 01:15:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw88nUSs0Hv8dB1+dpF+HQmtiAvjFowzvsfyZwyObDmCFZA1/o5VczaPajww6eVKl/myOEY X-Received: by 2002:a5d:9ada:: with SMTP id x26mr24858916ion.50.1629706544289; Mon, 23 Aug 2021 01:15:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1629706544; cv=pass; d=google.com; s=arc-20160816; b=yTqzndq4kZ6k4CpoR0jrxBub0GGFAOvI5EpB2hTeZcCFaXkLxUcOjGEAWilaQx8I9s Cuw6fXnCX8bTub0Hmw+z/ryJ8u871aBZbktYDk62rTvp0LlQMPT7dsiD4TF8Oe4EKL9r gO0/hJxTlrhVyhEsAB0prNYCPmVDvHduEW8TJKIs8Qw+xfnMEltgPEVfGlxuKeOmwUPD 8Espv3fUDYiaIdvvSz0MaDp0oGLXOy9W7cAHnDVc5Y10Ow/GNMcKOSRRkD6OgeKf/a2a 4j+7ez9bpMUkRVzQFyqRktvEcsACcbTM0unM514bDbNmr4jmtbVDd+JJPV1LJaBOrVjU Rw0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=Tw4kz3LKaDvgvYo2NNwVRob/VNkU4czRxuXkXo9wQhU=; b=vlrV5fjNe0FiWj7BxJAfjni9OK080vHXNe+J005gST7xHB9HVWlDmhtXcDd1fjJGSM LC1gfE3VwnIsF1c3WZb739TSGBiHxj7a/jOG58kX384H6Q3n1g7DUzi0NO45IctGbejm pRgzkA0oNcAbdVNvXWMsj+Mxe2nQv7BbB3A0EI3fnCRG/ph9j9KSYQZHVJgL2ARgVTNy v4C2IUsVCXzUmvGx5y/fxb9Yr6GS8L+4NIuc8Byc01qefVtJqFE9fKBvcNH405y4yoSx 8BsLrJabzV2bXSqMyflHMca4Nv3EU9InnCooUligWGxFXd/HJEEiPddQu97PulHfVn8J DYeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@viverislicensing.onmicrosoft.com header.s=selector2-viverislicensing-onmicrosoft-com header.b=N5sDW0l8; arc=pass (i=1 spf=pass spfdomain=viveris.fr dkim=pass dkdomain=viveris.fr dmarc=pass fromdomain=viveris.fr); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si12722706iox.32.2021.08.23.01.15.32; Mon, 23 Aug 2021 01:15:44 -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; dkim=pass header.i=@viverislicensing.onmicrosoft.com header.s=selector2-viverislicensing-onmicrosoft-com header.b=N5sDW0l8; arc=pass (i=1 spf=pass spfdomain=viveris.fr dkim=pass dkdomain=viveris.fr dmarc=pass fromdomain=viveris.fr); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235462AbhHWIPa (ORCPT + 99 others); Mon, 23 Aug 2021 04:15:30 -0400 Received: from mail-eopbgr80109.outbound.protection.outlook.com ([40.107.8.109]:54689 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235316AbhHWIP3 (ORCPT ); Mon, 23 Aug 2021 04:15:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aXV2ryHNnWummhaPN985XudrVluCdV+QlX2FjPAPmmzUmJSrZsxZYio5+Cu8mgEX6V8WPRnGqCGMg6oBm+mZy8WPeJWUGfR732qdit/bC+1gxBWlMKXOxByz7t0nG/rJZEWOmub8OWR0R/ERNWAyCpKxiYkilzRvdlWKjWUCVY02JVwb9HAnQ0PUWihdxRc2kojczgv3N487fRLYhlUQb1zZvKUuWHj8W9fQzlC+Tb/xbleHPkXlWG7F9IHneqOm1UlqxnANQO6Er0pVoTGZLZFCf9gnRae+3+GHfzE4QJEeZ1U7MEF6gVGEpLFpkbwtxBtsU+Ly9VIps6PcEOmF7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tw4kz3LKaDvgvYo2NNwVRob/VNkU4czRxuXkXo9wQhU=; b=UMzEKj3DCwddlHnmq8fNGesZ7MCOYwqwJiblow4uASUgq03LAXkeXRqPk04UfPS61RnPHCwdEbeEvsQFNIonZANQjDUpXGchVv88PpiF3z98Ocm2W3R0TPOtBOqf7kGN4hGZJI4i/rWG/Qd4g9eBXzL4upf3DMxPxvCmGjmTQxLiqsyoWkJ8kpvki9V8QnnipKmK9MzaDmilE/FxyJ/21NgAH4jo9Dl7NqypdzR0rJ5UiNgIVxsUzCvl+gt+SeiNmt4SsxC6gv2leR5tduhw++fzmR1G2HSqJYbzAG6Uc1xevVgSAV1/2ehdZ1pIoMRn5NM6Fg3NG0whIaiEMU1Gfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=viveris.fr; dmarc=pass action=none header.from=viveris.fr; dkim=pass header.d=viveris.fr; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=viverislicensing.onmicrosoft.com; s=selector2-viverislicensing-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tw4kz3LKaDvgvYo2NNwVRob/VNkU4czRxuXkXo9wQhU=; b=N5sDW0l8guX68tb0i/ss1R9fuV1rvbhWnehd1mkeY4JgBV/REJnKWKXPQmluEaq1vSmB2fnoZ1oMZ2DtimDqGxIZ/B+bVimztcSUW4iQyMP7O3RxcfFGGvAI9tCQh0ToVy+MUXfFKuTcZkfXs2N9/fdUX0fVjcc5Srwej0m8vK8= Received: from AM4PR0902MB1748.eurprd09.prod.outlook.com (2603:10a6:200:96::21) by AM9PR09MB4612.eurprd09.prod.outlook.com (2603:10a6:20b:2da::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.23; Mon, 23 Aug 2021 08:14:44 +0000 Received: from AM4PR0902MB1748.eurprd09.prod.outlook.com ([fe80::84a0:780d:1c5c:4432]) by AM4PR0902MB1748.eurprd09.prod.outlook.com ([fe80::84a0:780d:1c5c:4432%9]) with mapi id 15.20.4436.024; Mon, 23 Aug 2021 08:14:44 +0000 From: THOBY Simon To: liqiong , Mimi Zohar CC: "dmitry.kasatkin@gmail.com" , "jmorris@namei.org" , "serge@hallyn.com" , "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ima: fix infinite loop within "ima_match_policy" function. Thread-Topic: [PATCH] ima: fix infinite loop within "ima_match_policy" function. Thread-Index: AQHXlPnZCsK5CNi7NkWxUIAyoKg2DKt8LpyAgAA0rYCAAChigIAD4XiAgABUhACAAAJBAA== Date: Mon, 23 Aug 2021 08:14:44 +0000 Message-ID: References: <20210819101529.28001-1-liqiong@nfschina.com> <8d17f252-4a93-f430-3f25-e75556ab01e8@viveris.fr> <1f631c3d-5dce-e477-bfb3-05aa38836442@viveris.fr> <96037695de6125c701889c168550def278adfd4b.camel@linux.ibm.com> In-Reply-To: Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nfschina.com; dkim=none (message not signed) header.d=none;nfschina.com; dmarc=none action=none header.from=viveris.fr; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 927ba316-b47b-4c32-d6b7-08d9660e10d6 x-ms-traffictypediagnostic: AM9PR09MB4612: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gzpAKElwdtB2sLC/yrH8inb6j6pW7LQaA5aG8IEjGATjW0PKo27m81rpex9QY4oNcmYjVRcueakx3NURu98mLmY0J0sIOfamf47BCvXnu0/ucwxw2iKwKYVPHgofH1WmzlDBNSSHXYorLCzUPzDGvwbiKIm635f496wjflic5yRGLaj2gBBMJf/AOcUpbvYm6jQdeCynef4nmCVFyJO7L6hQxG2/n70xvjMt50QZWBhSmi5IUD6vW/l0cIyanczkgoiOZiQKVTomAba9IOjqmmnQj0ZVQOwkNjEJGBuX0EuxSgc3pQtv71ZyIODmbDMlpZz30/oqWSc7cWvHDv8a42UreD00ye4wleR1JXYwCduk7HSGdfae1qwBTFUOLvHoGsdjuPQzDD63ITACe+pvor2XYF7+6nqKsgeu7fji+jBaan3KsEEiN6sXuAUpwrAH6RMN0Kbye0lu9MVHpWCZlDhFRABczg/ZhqVUU5ci/VLx4q066maeF4ugDXHwszVFaVFc6yGAJYpmKP+35dQhdRBdy2wkQ1lUwfJij+ftvY+IeWYc8NBEttnfT8PCMqYhOUiYBXCgUYmDahmOBvbXYNcm+zOtoccFr9Xr7aQaempo0HtnN8vB+m8yyZjTMVyVhf6H0LzBbfe2srJCu1+gLjO3HY7J4Otv3TN8rx8gdi4uLaJIcsFgfgutAM90QAGoYBrcN7NwEvHGl0riwkx8oDO+zP+u+RBsbOnsQJ9CKaQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM4PR0902MB1748.eurprd09.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(396003)(376002)(136003)(346002)(39840400004)(36756003)(66476007)(71200400001)(478600001)(66556008)(6486002)(110136005)(6506007)(64756008)(5660300002)(316002)(66446008)(54906003)(2616005)(4326008)(31686004)(38100700002)(53546011)(8676002)(91956017)(66946007)(76116006)(122000001)(2906002)(86362001)(31696002)(8936002)(6512007)(186003)(26005)(38070700005)(83380400001)(45980500001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?RW1FdHc4TE11SUphKy9kdTkvaEZaRnM4eU40ZStuZUgrRUJPOWJHTXhZNWp6?= =?utf-8?B?NngzaUcwL2w4WWd6bmk0LzBlSDh2dWwvcmZjZitBdmNhSG5xR2R2aE4xUGFN?= =?utf-8?B?Tk1tdDRnR0lVVG5IaHRZRVgzUTVyaU9tajRDeHl1VmdSVzFCckZWanNZSnBZ?= =?utf-8?B?QTlneDVJYkIydjZ5eTcxZTNROVlTSUE3UEwvUFVqYytud2xGeEJPTFZLT1hO?= =?utf-8?B?a3hjZm1kZUNUNDJPd0grSHQza1ovaGlrR0tYMFZwL2Z2SGxSb1RzMHk3VG85?= =?utf-8?B?a3BaZnVlSlhNOTU0RElQbDVkTG50eGU1TmJUVzl3a1V5Z3c3MmJheGhJMVRl?= =?utf-8?B?OVlqdm0zYmNUdkVlZVJYSlY4Wmk4aEgxa3Q2T2hvVjhycnM1UWxwZno1aGNM?= =?utf-8?B?VzExellUL2s5dHN6THIwTGpRSFhGMDJKb3gzVjBYOWJ1Ry9qWkl6Wkd1Z05E?= =?utf-8?B?amNMRWNyWUJwN0hYaTczV3FiNHRtcksyNTlHKzVKejFCL25CblpBZXIrRFBw?= =?utf-8?B?S2E0NFBzcHlmQjNyZUVFZTlaYjg4dmgwVlB5R1g4SElib1BONS9DSmpPTGhp?= =?utf-8?B?VHhwVnovSEVjeWx1WnBya1NHNUhJaWlhSUUxWFNNTlVPa2NYclJGYlkzR2lS?= =?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TDhkMktWZmxLVm45VUVEM2tG?= =?utf-8?B?d2hCVklRaCtSOE5sVktUbFRIRFpUTVJOWlNDa1Z2aXVKRGNWQkNGTTRVNE43?= =?utf-8?B?TFE0UWdrQnlxanRkbFZtRFVHbXRrbzhNZjV2aWE4VmdidWdZVzJ5MXRBSWM5?= =?utf-8?B?RGZ2OGMwRnBWOEREUXRNdVVTTkVVYitNMzBkYXBxeGdBT0lUM3AzcXU4RHV6?= =?utf-8?Q?MY2UpF4F7l3A1soHn4wFK/yXIjj/K2LgBzRS/ql?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: <86A2A26ABF74AB40A1B539CE12B859E8@eurprd09.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: viveris.fr X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM4PR0902MB1748.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 927ba316-b47b-4c32-d6b7-08d9660e10d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2021 08:14:44.7156 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 34bab81c-945c-43f1-ad13-592b97e11b40 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tObkKbGQ8eoToSisWT7XQoRQvoMIdlwSXm3AEScX/QJz/FnDY2ZuJOYUYuSxt8i/n0x18eJ3o7sgn6cgmtbUyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR09MB4612 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgTGlxaW9uZywNCg0KT24gOC8yMy8yMSAxMDowNiBBTSwgbGlxaW9uZyB3cm90ZToNCj4gSGkg U2ltb24gOg0KPiANCj4gVXNpbmcgYSB0ZW1wb3JhcnkgaW1hX3J1bGVzIHZhcmlhYmxlIGlzIG5v dC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