From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796279873; b=u77mYvFTWkIudGRXP/8QV2wNN0KWtI9zdI4R6SPH7eIqDPQZv3s7JcQ6A4M9dMkUu1wp kJ1lbTqrwymHmNV6xTa/rHDTsvT/hMJjC7qVVs1jzLNe2+j3R7CIIPJJ45zobaMqLHNv7 dIYKP76u6tTAyH+7RFo14AtlK0hjjSHGOslIFmP6+jBUnZNJOuEBUIaI9N/P5mYxY3bK5 5ZD8GsnjwAlXUayuzuJgdxx5qmv86OPNeNsSmLQnAKEnkcI4RN9sEvSTmjrMtal05rrCB gqU7n2j4Qto+K6FACJT7SLC+A5aINTQFqEJO1QVzq1LVnOaFViJn/3lYHEfm1rLMqrA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796279873; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=fBViAK8VQ6GVtVRTo4LKholBhEg6lqP9NWW4yKXSomY=; b=SDdH22ajd6KxAZFgo61qVlB3hyfOQ4H6vQ9FRPxW61p2ig+ruTlclYQshet9B634OLGj e3s/GVB07FxK5f8u48X/EhFNUJlOS6HehZ6ccfiXMtN0sRs8dsznByBgtbm9IeJChwgL+ 3JjL7zCr3AnOx3ADp7q3XkRjS01bwiGqixtv4xEuECzG5RXOG4TwCQZtgRemGFgNGHIzA dGyOKjUYSAHaz53rBWjI5bvD5/dz0ItJ+YSentyF34pA+RwenfFnvbacGiZYDvvR7Pi21 CGQfoYr4uXKc8ET4MExfv4a2bqZVZTXQIgcighCKFLYyPQQvgykSEXCK+3xFtmDE/4Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=MljZmlvY; arc=none smtp.remote-ip=74.125.224.47 Received: from mail-yx1-f47.google.com (mail-yx1-f47.google.com [74.125.224.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 719D2606A32D for ; Thu, 3 Dec 2026 06:37:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 719D2606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=MljZmlvY Received: by mail-yx1-f47.google.com with SMTP id 956f58d0204a3-67db0791748so15886599d50.1 for ; Wed, 02 Dec 2026 22:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796279872; x=1796884672; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=fBViAK8VQ6GVtVRTo4LKholBhEg6lqP9NWW4yKXSomY=; b=MljZmlvYc7++NPyIwgNrWkKUjXkHnKZZkLTE20q+Q0qV0lD87V3halF0q5a6rJvS/j zCgSrUikm76ONefPrnPd8lofR24qyozB965xSg0iQUDJGh3ZNDELgLX5+rjZuhV3nsW5 fl9YB3zXHpF58SRIaXgIY+Pw4mz9W/RhUQBaIz4goZ1lz0c+Eg5m3iQYvMatJK8kCpK9 +u57q3XTk7Oop4EY4GtGVbMBTOx9lzlmVbSW8+NKqIuZcWefLV0+m9db4LsAncj1xeVr 06MraTnMSEKaf2Rz/1Aoga+hfsro8uTVzuduDTveTOnCd+RRF6EqqPGS/F6x/RTdpjeo ZwBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796279872; x=1796884672; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=fBViAK8VQ6GVtVRTo4LKholBhEg6lqP9NWW4yKXSomY=; b=t9WYvcx/ISp05zIs3R2EoetYJtsCSuq+ADRGd2fTyYIrIRlcMBLUe7WJqLvO5QrbdH gc00M255CPLD8JPLW2nMghqqYu+qrRWlLf3Oeg0U8ofcXfzqi/bT/RaHckHoLlUWIudM BftjsjMfOLkR5f54omyCJ6RV1500ykS/0w83gJZjtEIMpNRWdG9eSU++q55ScDLONtwW QPFaCOVdPs3tjLljdh2cgKpAnAui881b1oo64mSQ7993KVFcrLn7J4t9e3baPtDDUtv8 cVVddLpEgZdK/Hc0oAuQ5tMuzb83mtkH0J1xUpz2QRW6+wqYM+TuJNPvYLqk3MOQ4Q+0 IWnA== X-Gm-Message-State: APuU4Z9UQCULv4iMZ3WVX7/bpX4Svs6pOx82tfs2ZuroWkmnVVO5dXTq PP1rKFVsl/48FmnA+bHD/v3FxaGwFpxB8/Y4BQpY/SxaPD4jRpQxfrAj X-Gm-Gg: AZFdTZepohNEOguQ4L7QR9SjBZXITK/aUV/UKFOFDSj0kYw+a1LEZe98D4/3lil5iVw E8h/1J+3pbaKTC3hh9lNqVhyiZNKvc2Y8giHYx+7W98gODpg1VqX0irNDU+Y1MqrevZx3uesSv4 ZUxii2tVg/e3AiUyEwChBN+VYhUXoKMUAf1P1N7FYw5KWeyyHexW6uWyOGTiSSAKhkYWqdXhyKV VWmmnwHN9treF3Y+ARHeWHzjjPPdZIkDJddP6VRnq/F4cCgZZu0XhpF2RzA9vg2qB7pci/B2l6U bfkD6+mpqKSxV3btWsDvM0/RyWzQMZsHhj2Cy8JbvkJd0a1R10e1tuMbkrqsqghQrKvr4jtr/8H UNmsc9hyXnORDF1Gj76599s4mbunZclv8caAk9n4MWGhbF+yyDr+odc+p8OBJeqpYxxCzZ5LVtl HOkMfESO+8W3hYSWolsNT7dk62qYW2tsFQ8ps9eeFv2eUvkZ0vldrb1K0x4pdWDhgl5WeADRLts DfvSPepRvP0oJLUXOCExbUDttIkxKhZUQhIabmQQMhcXx4fWyYFFiaDeL/QpUWU9uHcdZyDprd4 3OmnLktgX3YIuU5p2ieDg07Id3GcGiKRC+8lQKywXYm3H1I1IFLCyQ== X-Received: by 2002:a05:690e:11cf:b0:679:afc8:9d2a with SMTP id 956f58d0204a3-67df440f173mr20915697d50.54.1796279872532; Wed, 02 Dec 2026 22:37:52 -0800 (PST) Received: from VPN-158-165.vpn.usf.edu ([2607:fe50:0:f802::4046]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67eb40514besm2492793d50.22.2026.12.02.22.37.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Dec 2026 22:37:51 -0800 (PST) From: Juan Agustin Niccolini To: Sabrina Dubroca , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, Kyuwon Cho , Cosmin Ratiu , Haseeb Malik , Paul Blakey , Marcelo Ricardo Leitner , Yossi Kuperman , Jiri Pirko Subject: [PATCH net 0/2] macvlan, macsec: fix double free of conntrack extensions by clones Date: Thu, 3 Dec 2026 01:37:43 -0500 Message-ID: <20261203063745.75353-1-juanagusnicco@gmail.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit macvlan in source mode and macsec both have a double free of a conntrack extension area. Each hands its own device a clone of a received frame that keeps the original's conntrack entry, still unconfirmed if tc act_ct attached it at the lower device's ingress. When the clone and the original reach nftables on different CPUs, both reallocate that entry's extension area and the old area is freed twice. An unprivileged user can trigger both from a user and network namespace: RPS can be enabled there for new devices through net.core.rps_default_mask, which makes the clone run on another CPU. This is the bug that "macvlan: drop the conntrack entry of broadcast clones" fixes for macvlan's broadcast clones: https://lore.kernel.org/netdev/179607207068.562302.5326868635249894085@skku.edu/ These are the other two places that deliver such clones. Both patches drop the clone's entry, as that patch does, and apply with or without it. Both bugs were discovered during an LLM-based review of that patch. Reproducers for both: https://github.com/AgusNicco/macvlan-macsec-double-free Juan Agustin Niccolini (2): macvlan: drop the conntrack entry of source-mode clones to fix a double free macsec: drop the conntrack entry of delivered clones to fix a double free drivers/net/macsec.c | 3 +++ drivers/net/macvlan.c | 1 + 2 files changed, 4 insertions(+) base-commit: 5584a17feee004afa77ffb0df938011d7239de87 -- 2.43.0