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 7A9032563F for ; Wed, 28 Feb 2024 08:16:38 +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=1709108198; cv=none; b=dBdBuWlDfDj4BKzAi2jY4E/dIILOMvwI2732XKp1Q82btD832GMJCqRMHzEa5ppIUbzJm4ZUYD9IJsKnfRdl2XcrruvyA+SuoFRez2dG9r4ZxwzLw310aJlpOuyruIR/lvyPBLqcXvEhfiputyNriNlV7QmchGhGVy0DqjDtZUY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108198; c=relaxed/simple; bh=cCRW5gVH1dKyfp6xo3i9913gt7NMfjwYwLfduGBiDHg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NQZZ0RtB6YMB6j04zrbKh/6dS86JSRsCx2+nMi2xsms5/g62qHazFFFgJG0HH/PP6KHGI7Pv9clW4/5JPrDPks18k11npn5h3MTU0CqcwjSIVvzmGUJiLrNUBZyK9C8ha8mh6IvEPISCqGxnLALSM+OqVCFEE2qiaX5s/avjCHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=t3Ucg/bU; 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="t3Ucg/bU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB847C433F1; Wed, 28 Feb 2024 08:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108198; bh=cCRW5gVH1dKyfp6xo3i9913gt7NMfjwYwLfduGBiDHg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=t3Ucg/bUXneKVTKn+wkoRSVyey0Vlm3SCXj6qNe9xeQ7HP1aaewAp3vsus+Hq4I4Y xp2dML9dH69A2DOU5NeQzxSD/bg4Ken+qScWyVIm1TpDQt2EE2R/Iqip8iouM9BU6C AVmXH97V5++EmFeGTH78GbnKyFiyfTLoTzaLHmro= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-46979: iio: core: fix ioctl handlers removal Date: Wed, 28 Feb 2024 09:14:29 +0100 Message-ID: <2024022823-CVE-2021-46979-de90@gregkh> X-Mailer: git-send-email 2.44.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=2193; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=x91Q+6TBdYbKs2UfaSQcRRFUFeyEzbv1X7ucriPLcFs=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3XsfL+1x/tDSB9w3/hfg7WecSa2fktFr8ZVVbrjK1u ynkWjpDRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExk60eG+TkvK4RV9q560n9Y 8NiV1ZVy6X6fZzLM4T+5KSBOvMn5R+CitNt5euVdk7/bAgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: iio: core: fix ioctl handlers removal Currently ioctl handlers are removed twice. For the first time during iio_device_unregister() then later on inside iio_device_unregister_eventset() and iio_buffers_free_sysfs_and_mask(). Double free leads to kernel panic. Fix this by not touching ioctl handlers list directly but rather letting code responsible for registration call the matching cleanup routine itself. The Linux kernel CVE team has assigned CVE-2021-46979 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit 8dedcc3eee3ac and fixed in 5.11.22 with commit 11e1cae5da40 Issue introduced in 5.11 with commit 8dedcc3eee3ac and fixed in 5.12.5 with commit ab6c935ba3a0 Issue introduced in 5.11 with commit 8dedcc3eee3ac and fixed in 5.13 with commit 901f84de0e16 Please see https://www.kernel.org or 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-2021-46979 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: drivers/iio/industrialio-core.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/11e1cae5da4096552f7c091476cbadbc0d1817da https://git.kernel.org/stable/c/ab6c935ba3a04317632f3b8b68675bdbaf395303 https://git.kernel.org/stable/c/901f84de0e16bde10a72d7eb2f2eb73fcde8fa1a