Article View: linux.kernel.netdev
Article #23296Re: [PATCH v2] idpf: fix vport_id used as array index in MAC filter async handler
From: Hongyu Guo
Date: Fri, 27 Nov 2026 02:33
Date: Fri, 27 Nov 2026 02:33
17 lines
9339 bytes
9339 bytes
The Medium finding is real and already addressed in v2, which was posted before this review ran: the handler now returns early when IDPF_REMOVE_IN_PROG is set, before it looks up or touches any vport. The Low finding is also correct. The old code did not just read out of bounds: when the device-side id was in range but did not match its own slot, it removed the filters from the wrong vport's list, and when the id pointed at a slot that was never allocated, vport_config[] was NULL and the handler dereferenced it. v3 will add these cases to the changelog. Returning the slot index from the lookup instead of dereferencing vport would close the remaining window between the REMOVE_IN_PROG check and the vport->idx read. I can switch to that if preferred. pw-bot: cr
Technical Details
Message-ID:
<20261127023358.258140-1-guohongyu@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372414-linux-kernel-netdev=dewy.ruReferences:
<179574583226.3135.4850818709708500001@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372414-linux-kernel-netdev=dewy.ru From: guohongyu@cmss.chinamobile.com (Hongyu Guo) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v2] idpf: fix vport_id used as array index in MAC filter async handler Date: Fri, 27 Nov 2026 10:33:58 +0800 Organization: Usenet Network Message-ID: <20261127023358.258140-1-guohongyu@cmss.chinamobile.com> References: <179574583226.3135.4850818709708500001@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="620242"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:67gJG2UUI76ze3rRo0Nrk4miH/4= sha256:MFTGk+1vYuWwZDWbMjjWJzG89JalWaQ15jmxlaM6+vc= sha1:eoZ6kpDdHd3ZP6iHjk/ny/JgDR0= sha256:UTWf0xssyY/fRDzZbVQ5bPgNfiVXnH0qb0SG5rciUP0= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 57BFE125F0D; Fri, 27 Nov 2026 05:41:32 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.751 X-Spam-Status: No, score=-2.751 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OyZMbxISzYwK; Fri, 27 Nov 2026 05:41:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-372414-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 43472125F0C; Fri, 27 Nov 2026 05:41:21 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id F084D2C615; Fri, 27 Nov 2026 02:41:19 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795747278; b=oKSw3cjb5eWKMCcTlmIcrZsx6qLRKNIDYdR2geQatclNpZY0Y7VlN65Zd3NxHh1thL91 GGnCxXn0IsulJw0SyXMTS04XMzrT2+aHpgrPgMe5dZ+hj5RVHo139Wp+vXbhO8A4F2yte M5HuikPV/cDaKh+NhLNnzStSIgfToNKrEY4BdCpaf7SesqZjxm7G2+hOsIId1NNVrsO8P aCQb+htCOcmgWtA4TWloqGsqo6vrYpx2tO+WkXvgfstcgh6n2JhzKW1/EoiX+Hz8BOF8x KrcYY6/Yh1xFxxLNwhoCxJ45J1w2HgnS881pDk1s02iJiQakgA4Z35PddIwgsUX3lMQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795747278; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=3O++9cFaFQX1xStaQ4AA838XUZsWOaUKNYAROFpPYxk=; b=5St/BVeg8+2kV95NpnZJnJPR+Hb/CklJBXjUDo88QOCi7UbR3vqHfybx101PTe9nVpCB 4bkQjf+poKIjXAhhX4UD6SKjLRPpN+yTCdKobYpvWhambnBf0NM0AIbeBkMksnLh4GcR2 +Kb0AvjrTV7AEk9xjM7PanewnYs5GoZRD7TcCu7CymKRzsn+d4o58Daba9mVVXDkD5xOt kCXdiMFaJy5tehe/0IpTiAYPz0CkKYFjcyrnKtLUMw7h/g2HJWkqqzswH6kVzPsc6M4BU qtWDkrTVOwQ1AX7xksbVp3I89bYY6s+VFfFg2AgKa6RWmAigYaWPSwnEGVUGTfrKPhQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=jsoFFDGC; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0811F606A327; Fri, 27 Nov 2026 02:41:18 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=jsoFFDGC X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.151 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795747277; b=Yq+B4+XJquaVMknF4GTlqCSjudUhDJKpYjGpjbcUmcPjfHB4oqrWFVi7I2yx9tqviimJ 3Tktb2bMgtKhlO3VgywFRo6CMtiA0yrynWeqIjGeRt0JV3YEzk6iYOJ4W295XvuknlAhc Nn9hUnsfvxm/IAFUEoRU5g02S/sGBwqXzRVFy1lDuIvCrQaCCq6qjHPToN3u3vsywWRY7 h/9WduW9ZkQZ3PGYrxfoj5qsVsuFw7ySOiCiqC9fF5tqWa3geOT6/SKSPRVLBGZ1N7vFe MzZFvXLb3d7GCX+fhBiWkmGh4tnY1H7zJDWhFFlVSUEjUIKYWnAjIAHOVsagINaw+9w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795747277; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=3O++9cFaFQX1xStaQ4AA838XUZsWOaUKNYAROFpPYxk=; b=HmAFoDnCcI3RrwR40tfZUXda+M8y0ByPvNitXb0wd+qeilgVpSPmDkYPe3MOmF0JaniE ObVC9l/Vv2fIy+3nX3uZNRKZky1/7EGNv3QGiGU8uvUEU2GYDH0+XHHaHn/VxvN+xW9jo oTVJqPmnX/WEjzM2DBiqWHcfLG6yaEMATIQR80lK3bqlCeX/NqcAuv6OhA5UVNO/jV1se r7BTngjh61pVlzWJse8vY6q1co7uKolK1i7jpVH0//MBDkPXEc7EAZtZ+Iostlw6E4/Mh KrRWJvvfBtXnhC+RVEromRxdYVvnkEk6Jiw/Hy7bROLCTmPuDTYgl2RmJYKz7G/Yn2Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=jsoFFDGC; arc=none smtp.remote-ip=111.22.67.151 X-Received: from cmccmta8.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1005A606A31C for <netdev@vger.kernel.org>; Fri, 27 Nov 2026 02:41:15 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1005A606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=jsoFFDGCXuxkmfLAwLMHFDBwaWTuD7F+kDtUIUkXYCGf/1NyHQm88N2ZoESxjT2ZzArqBNlP29dmt e/RfLcNs3Nb27Jp8h9K95h//rRYeVZ8qnE6VaFtcJQiR1b+i67f/cbi9las4vyb0Z3O5uhN6kmQU3X 3PLEwz0dcQTd61og= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app02-12002 (RichMail) with SMTP id 2ee26b08edc9799-9d0d7; Fri, 27 Nov 2026 10:41:13 +0800 (CST) X-RM-TRANSID: 2ee26b08edc9799-9d0d7 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from localhost.localdomain (unknown[223.112.32.189]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee36b08edc8228-0b34c; Fri, 27 Nov 2026 10:41:13 +0800 (CST) X-RM-TRANSID: 2ee36b08edc8228-0b34c X-Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, alan.brady@intel.com, 13057616121@163.com X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <179574583226.3135.4850818709708500001@kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list