Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp196743pxt; Wed, 4 Aug 2021 08:56:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6uM0OOxzXUNjFmhgArprTGR8wMfl/hJM2Fe9VGiDmtPoK8Gzrc8A9ei1FCDGGoeFcxcYw X-Received: by 2002:aa7:d285:: with SMTP id w5mr509925edq.132.1628092572353; Wed, 04 Aug 2021 08:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628092572; cv=none; d=google.com; s=arc-20160816; b=OJH4puPhvEqeIq7cvmSC/cGwPaUV1ZL3wS8Dz2IfirqoECJR/kHZAFdtJAMVQspAF3 t/3cCZYZVBl20UGzERQfyy+Qnn6IlMnocKHFq7ImRuGTxe78Y/kL2lrKYRkG7qMh7YkW RtfPyDaVilFd07OuR/+aablQYa7C/j0VnLy5fRTsqid0rKjMy+CParD4U6k46UZFdfNJ WfUX89Q4Ltr+uVbKsFJ/aLPxM75LCQJiXcgkqhUX0kcogCX6ZPclv3y6oTXGKuf/AfJ0 QkmvlNbEn91LVOS0mkAJILloxQybsU8VfF6pSlZbvLeApTmZvuycKLZCWdBe8FQXcjac fSdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MFb0mtSBNfYCXWuLJ4WFezyMCJ+009tKgdeIKYVHYDk=; b=khweUj5XghpFn+0rJhM8qSGqWH0KVYvaWjOL/Uidh/tXDIxLJg82sP+x+I0OIZgFT8 3859iUiixlqpqI+w1t7wOPJ+y1z2PnxWkWEc+fd9JB0sPWJNoJRa2QctZ8U6FmSLciLd 3iLArm4Nnu4Ve5wAMDh7NhY4lIG3YVNCyM5ETSTJYtwnqf/7l4MLEf0b6wHXCWmMZR0n //+DEpC3ZIK2IXShm3/gENb4EnEDOhvQjLC6zAFa4LRRiuoVJN5Ip28s7pAZ1ARgZaC5 dlWapZeCWu9qd6OIHnzYjhBixdifRBj08LO02MvI+vLUjUnlFVU/PK/p6/YIdiUCaa29 6ntA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N5MxHxPz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x59si2702347ede.247.2021.08.04.08.55.49; Wed, 04 Aug 2021 08:56:12 -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=@gmail.com header.s=20161025 header.b=N5MxHxPz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239488AbhHDPv6 (ORCPT + 99 others); Wed, 4 Aug 2021 11:51:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239214AbhHDPv5 (ORCPT ); Wed, 4 Aug 2021 11:51:57 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7ACEC0613D5; Wed, 4 Aug 2021 08:51:43 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id m9so3100351ljp.7; Wed, 04 Aug 2021 08:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MFb0mtSBNfYCXWuLJ4WFezyMCJ+009tKgdeIKYVHYDk=; b=N5MxHxPzZWY/QQdU+75Q5PW5zVR2TFcqf3SAKpSTQqNyKbFjFMw3TO9XTHcYQsrrGX ejLL8A3e0ezvqhOrMQZcRUZVU8kGswjndweMy1CauCIsMmcKTZRD5haKOG9TU7M+p8Uu iQLoVM3Cd6ehlLMEl/T+CLltHCW9ATMuvwf0jNZHCGBKEJa2vHnpkwetUnYE++QF8sJn j7aLH3rAeN+WuKHqPTrkwyppMGOueXdWy/3KOelMTEpFmeikv7rzJA+ut0DtWwXiNcRz mTuheHVAYpdhfaFd4vtJXqx7ln6GnFFBnSyeT1sq5nzLrgTYxFg8v4u3P1xY/c5qk7xr m3cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MFb0mtSBNfYCXWuLJ4WFezyMCJ+009tKgdeIKYVHYDk=; b=hOYnNRdUAnGOsE3SMyBbyKYF8AUvrWhHFopKmhKBO/PRdHtiLIThxhxTzjcFy+J5Fk zvVOstHmZrK4w2zdI/xfTSG2AZh7vlJCBOSdF9wjEvggoPAppFitJl4TEcsYTTZuZydk ipISpzxut2et8PU/D8QKs6EPi3Yk8MSv5pN84747snUl3vBLaoCAWbqArHc0lSdaxAvk Okb6TQTwE01oMg/vIlNE/ty6cNTOoMKaVvoEj4h3LEYEikmQrLBr8Xz9veTjXjrDeHWK 7S5xHfSNltJg3ASoI5dO4Ogxjk6IAf7BYby/XxxE+GcqqrQtRZesTHkylRCqnIrgD4MV okJQ== X-Gm-Message-State: AOAM532J/3kKJJqeAiKvW9rK7ed9AWwAeoQL8WgiB9pYA4DkuNDNOLTh 7Kpms02ZPz62oQnJ0Xt0p+0= X-Received: by 2002:a05:651c:3c1:: with SMTP id f1mr107539ljp.82.1628092302185; Wed, 04 Aug 2021 08:51:42 -0700 (PDT) Received: from localhost.localdomain ([94.103.226.235]) by smtp.gmail.com with ESMTPSA id i21sm231641lfc.92.2021.08.04.08.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 08:51:41 -0700 (PDT) From: Pavel Skripkin To: davem@davemloft.net, kuba@kernel.org, qiangqing.zhang@nxp.com, hslester96@gmail.com, fugang.duan@nxp.com, jdmason@kudzu.us, jesse.brandeburg@intel.com, colin.king@canonical.com Cc: dan.carpenter@oracle.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pavel Skripkin Subject: [PATCH 0/2] net: fix use-after-free bugs Date: Wed, 4 Aug 2021 18:48:57 +0300 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I've added new checker to smatch yesterday. It warns about using netdev_priv() pointer after free_{netdev,candev}() call. I hope, it will get into next smatch release. Some of the reported bugs are fixed and upstreamed already, but Dan ran new smatch with allmodconfig and found 2 more. Big thanks to Dan for doing it, because I totally forgot to do it. Pavel Skripkin (2): net: fec: fix use-after-free in fec_drv_remove net: vxge: fix use-after-free in vxge_device_unregister drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.32.0