Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8077F14BF92 for ; Sat, 9 Nov 2024 10:18:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147505; cv=none; b=OMaJ434edV7d8r85fmItW1ltlm2gJLJ+PvQnTErOi7l8RmhKXSygPUu7P1W4fts/pMvltcV/78e1Znxs6J8kbemZYAGzDqWuuRg7DLG7GmVZ6Ej83R746Q3mslWn6lclENGlM2WGta77ya+KX862acE9ycH3DARctKJ26fuZNiE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147505; c=relaxed/simple; bh=WFTPF7aZ4EH4Z/0ymNJa8npmc9vrLtdjhFejR8JjogU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=t/yyPAfxjZYb+mg0REdM825GwHUJvIK5VZyEMfB8QG49nwawFkTm9uYg13raxReBWBC9CJkpp0iYysIP7i9dOBddIIMhC8+HDxtyLFVk1W/LrX7hUEMZ6h6IMgZvJLjUpIFJmGDOyUdWQ3ZaBE4xjnL4N6UIiyxexljq7hOyB2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=npBoyuMD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="npBoyuMD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1830C4CECE; Sat, 9 Nov 2024 10:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147505; bh=WFTPF7aZ4EH4Z/0ymNJa8npmc9vrLtdjhFejR8JjogU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=npBoyuMD5oMwxfyH6JUBVIvhvaMQ2Wb2Sm7f5nowA2OdVlAdDanBNjHOE7+wEjnAM 97Ge/8mT3GyIQcbvBWLrrhcEtNuVcCDWw+41hK55I370hMQUu8Kcp4AYMXOozGjoXI ULjun3WoZrnS9JKQmWIrNRrZZoBFs6l9Q9kELbRs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50260: sock_map: fix a NULL pointer dereference in sock_map_link_update_prog() Date: Sat, 9 Nov 2024 11:16:08 +0100 Message-ID: <2024110940-CVE-2024-50260-db68@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2181; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WFTPF7aZ4EH4Z/0ymNJa8npmc9vrLtdjhFejR8JjogU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6Zj5PwjZ2H5m78M7Ff+f5uCeobo2/rXE5NneHb5VT3 /FvyrkeHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRPZ8ZFhx6pDEt+M/jKxdE f576Uqd9Jb0w34thwWYnP8ZNhxbd3xS++wrHdZ/QKSvqXwEA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: sock_map: fix a NULL pointer dereference in sock_map_link_update_prog() The following race condition could trigger a NULL pointer dereference: sock_map_link_detach(): sock_map_link_update_prog(): mutex_lock(&sockmap_mutex); ... sockmap_link->map = NULL; mutex_unlock(&sockmap_mutex); mutex_lock(&sockmap_mutex); ... sock_map_prog_link_lookup(sockmap_link->map); mutex_unlock(&sockmap_mutex); Fix it by adding a NULL pointer check. In this specific case, it makes no sense to update a link which is being released. The Linux kernel CVE team has assigned CVE-2024-50260 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit 699c23f02c65 and fixed in 6.11.7 with commit 9afe35fdda16 Issue introduced in 6.10 with commit 699c23f02c65 and fixed in 6.12-rc6 with commit 740be3b9a6d7 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-50260 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/core/sock_map.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/9afe35fdda16e09d5bd3c49a68ba8c680dd678bd https://git.kernel.org/stable/c/740be3b9a6d73336f8c7d540842d0831dc7a808b