Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp141311pxu; Tue, 13 Oct 2020 19:29:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIjmhfzy8+GpH5Aqf/0nkOttB/j8cHSywb4UtY6I5xF5BnrpZA6VZ8c9PPoMUKanPxZmxx X-Received: by 2002:a17:906:7045:: with SMTP id r5mr2837877ejj.355.1602642539871; Tue, 13 Oct 2020 19:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602642539; cv=none; d=google.com; s=arc-20160816; b=Sbr0CTYZjQxIPD0yjb0e2SF7IJ6y0O+gnXUUUo+U6GVjsfX4cXU+R2tSM3qTIPYnst q1celgV3VkL0QEPQx833byzvtUdC5yYrf8PqHTyu3YsF4IuYWg/W8jhjprLUmlw3g4EE IhSEvHjJKsljlFGDDpoc2e4jmrLcAiLbuS6VPzAMcsDVCVrbXn372sgGE5yLJd/C7Ab5 ykRObWXCpK10I0Aat+wyNd4tSA2k/SpHAbR/aOJwXE92qSoOgsiHOZh9FY86Oc69WcxI g24ybpdjQ4ZZUa80A4tZI8QPSn7ISNIrjratxmF/kIyRVY9OziKkcv7pLCzktlpx0/yD /p1A== 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; bh=z/aFQntV5BEuLQOersUesePgf9vJOqG7JddMqo5PmOE=; b=HYRRcaeciUEAg3ctEuzujBkXAelEZOw2Jnab4j6Jch5NUkba2/xtm0fBFV2yvUaNFu tvdvCmyA2kp+caB+wNQEEGunO60ascBOPKGLRlpxO8YuQ/ywI3V1ByD9sVcRLWjbQYm/ SFQV5AO2tfm48EZfr8X5cRjCTPb2Z+CwpFtg3f0wawKqxgJGdi2jDfIeng4FXKPjjFxb lyPc1ErncCPvv7N41TJ41PdQZV4zDuiCPICClJOEXt1g0kg9UF4pO5e1/UpP1TqB3shy PPaGGyW2YtI6xaEAtAD+8OxIPvgBY/wSdbwo/YadapBhDX/wTOEi9Dy6KJUEcA38KL+D GScA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si1160392edo.34.2020.10.13.19.28.35; Tue, 13 Oct 2020 19:28:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729092AbgJMRS4 (ORCPT + 99 others); Tue, 13 Oct 2020 13:18:56 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:59993 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgJMRS4 (ORCPT ); Tue, 13 Oct 2020 13:18:56 -0400 Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kSNws-0004AR-NL for linux-kernel@vger.kernel.org; Tue, 13 Oct 2020 17:18:54 +0000 Received: by mail-ed1-f72.google.com with SMTP id dc23so121126edb.13 for ; Tue, 13 Oct 2020 10:18:54 -0700 (PDT) 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=z/aFQntV5BEuLQOersUesePgf9vJOqG7JddMqo5PmOE=; b=SBuFH30DIfeZ27sHbbLds8O3FscbhfPhJ97f6EBuo16CLQD9DLeGarcTmLlKaPOnT2 MkRxW6hkH7h3iFU9ZSSymUmiaGAjaShqbAoAgoODyObpFDEDHb9+/tvhJ9Zr3/K1p3Ts k+yDEJNPZG/eVzt3soaA0/3QUE6IdgWPyw46lLdCovt+LTW3j9y7UMjSQ01BXRcriPsS KQIap+jBunMQ1o2PjxmxHHHEZiHT5pd6CYsPvwAGGUo29WPsn3gTlYthHj9cBQ7Rgx9T ySY6ub/SPecl6rn4W95lafclCP0MofC2tAyfJji+rFQezRwhF0/eRerMt6kxHSFrMidg eVVA== X-Gm-Message-State: AOAM531ZjuBFC5LJlOrQQYotaNjQhJbyMhuht7B3PRdQFfHukA/blwFl eFv7yzm1XvTcXhTFNLq6vBLyf2Vwh4lVzFW3l5yXkRExxJMO2+h1i8gMg59mSfliyTy/8Htt4uY NKr0B5WG3WbsGPM2cNo9y0zkQjdCG6Pv41+hbZShjwg== X-Received: by 2002:a17:906:aecf:: with SMTP id me15mr781861ejb.423.1602609534372; Tue, 13 Oct 2020 10:18:54 -0700 (PDT) X-Received: by 2002:a17:906:aecf:: with SMTP id me15mr781824ejb.423.1602609534064; Tue, 13 Oct 2020 10:18:54 -0700 (PDT) Received: from localhost.localdomain ([2a02:8108:4640:10c0:6cbe:6d37:31ed:e54b]) by smtp.gmail.com with ESMTPSA id g9sm192776edv.81.2020.10.13.10.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 10:18:53 -0700 (PDT) From: Kleber Sacilotto de Souza To: netdev@vger.kernel.org Cc: Gerrit Renker , "David S. Miller" , Jakub Kicinski , Thadeu Lima de Souza Cascardo , "Gustavo A. R. Silva" , "Alexander A. Klimov" , Kees Cook , Eric Dumazet , Alexey Kodanev , dccp@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] net: dccp: fix structure use-after-free Date: Tue, 13 Oct 2020 19:18:47 +0200 Message-Id: <20201013171849.236025-1-kleber.souza@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset addresses the following CVE: CVE-2020-16119 - DCCP CCID structure use-after-free Hadar Manor reported that by reusing a socket with an attached dccps_hc_tx_ccid as a listener, it will be used after being released, leading to DoS and potentially code execution. The first patch moves the ccid timers to struct dccp_sock to avoid its use-after-free, the second patch reverts 2677d2067731 "dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect()" that's not needed anymore and would cause another use-after-free. Thadeu Lima de Souza Cascardo (2): dccp: ccid: move timers to struct dccp_sock Revert "dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect()" include/linux/dccp.h | 2 ++ net/dccp/ccids/ccid2.c | 32 +++++++++++++++++++------------- net/dccp/ccids/ccid3.c | 30 ++++++++++++++++++++---------- net/dccp/proto.c | 2 ++ 4 files changed, 43 insertions(+), 23 deletions(-) -- 2.25.1