From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DAAA245A5D for ; Sun, 29 Sep 2024 17:41:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1737740652; Sun, 29 Sep 2024 17:41:35 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 4073D402E9 for ; Sun, 29 Sep 2024 17:41:26 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7d666fb3fb9so1871239a12.0 for ; Sun, 29 Sep 2024 08:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727624485; x=1728229285; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z4ivJFh4i+sS5Kt3NFIojkEwQfvp829B9cFV3HoaYyY=; b=dyvAIIWmcmpIOkdmc1ANtgycswQjDHwZp69/0f7GD84m4tIxGnFjMgUPz4/v4DjUgb tR/rFlSCncjNL0FnwJDrTMoHgybwAd5kOv7hqZ9AssaUQ+FWlVTvNo7bAQQkObYy7xYG eFMZAJ/brjzNeSEYUbV/LdaSLx9ITe0F6SSEzLsiMvEK37HVdCYw9/mQiopmdOnk5tkR 6A/Fmr39quI84mgbAZjmjc6OJJiIeqvNDwGHzvILLQmEoUU7nlKlkebnq3WvNznK6LhS 51Mq5YyQMyt6IcElPqhDuiUNY6PlVheDw/EOEevOQKLDTluRfUl7QMECH3GuQ+w9AG0J a5tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727624485; x=1728229285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z4ivJFh4i+sS5Kt3NFIojkEwQfvp829B9cFV3HoaYyY=; b=qE1DyhHW54qeH0F0xGASX2x1jz5D95kUzw3DyQCA3epmik4jLMwLZ0GHSJ3tK3vmkV Il7ox+o+iHtfD4xxZ2WYNKfH+sm/5gWrgqmsHOokOxpKvTGs8t/hlOLwAMLZ+Hn5B/MA oT2MO1uW+XYbr4X+qIlCAMVZx/Nnd80EDgBMpfofEi04QqTU71YI90nP+VtKDCk6bBc6 apd2g1510MkWHkqrKYeFq0sAUMy8lXmHa4ct0wE3XDdX8Q8TzjaPyy0Cdxj1GqSXOIOr QEF+4fyFvQLaiRLHSHL5ajvkLHoIYneqSSCROI+Okhoqvq5QxvM6JsLhu8egz3PyatzE DxNg== X-Forwarded-Encrypted: i=1; AJvYcCVQ85OPUem1RbcblmbolxQG17tTy/y6l1LifY+RiumbJGzOYhZ6fUhqQIWw0FxQsSyNHCyvCok=@dpdk.org X-Gm-Message-State: AOJu0Yz74f1rmRRNTLCsZqX2G6Wrbqt4+ZqO1BYt/rkpA+1Ts8Nomytc ZcLfKAT4DeKAAH97oxf9ERu7uF4Y9DXHdYUrdlLAz+fTU+o8rrtX57oyfayq58c= X-Google-Smtp-Source: AGHT+IEyZzBQdffdi3ObEm4zngX7Q6hOu5FqXIPGx6NSSgO2gdFenw13Tt1AE5kbA3u529Lc2QWuVg== X-Received: by 2002:a05:6a20:d817:b0:1cf:e5e4:a24e with SMTP id adf61e73a8af0-1d4fa3c0a9fmr15214034637.16.1727624485400; Sun, 29 Sep 2024 08:41:25 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649c775sm4707416b3a.29.2024.09.29.08.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 08:41:25 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , wei.zhao1@intel.com, stable@dpdk.org Subject: [PATCH v3 08/18] net/e1000: fix use-after-free Date: Sun, 29 Sep 2024 08:34:33 -0700 Message-ID: <20240929154107.62539-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240929154107.62539-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240929154107.62539-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The driver cleanup code was freeing the filter object then dereferencing it. Bugzilla ID: 1550 Fixes: 6a4d050e2855 ("net/igb: flush all the filter") Cc: wei.zhao1@intel.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/e1000/igb_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 095be27b08..973d0d2407 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -3907,11 +3907,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev, filter_info->twotuple_mask &= ~(1 << filter->index); TAILQ_REMOVE(&filter_info->twotuple_list, filter, entries); - rte_free(filter); E1000_WRITE_REG(hw, E1000_TTQF(filter->index), E1000_TTQF_DISABLE_MASK); E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0); E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0); + rte_free(filter); return 0; } @@ -4348,7 +4348,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, filter_info->fivetuple_mask &= ~(1 << filter->index); TAILQ_REMOVE(&filter_info->fivetuple_list, filter, entries); - rte_free(filter); E1000_WRITE_REG(hw, E1000_FTQF(filter->index), E1000_FTQF_VF_BP | E1000_FTQF_MASK); @@ -4357,6 +4356,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, E1000_WRITE_REG(hw, E1000_SPQF(filter->index), 0); E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0); E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0); + rte_free(filter); return 0; } -- 2.45.2