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 30E8D1A5B8C for ; Wed, 26 Feb 2025 01:58:49 +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=1740535129; cv=none; b=pPUQudPIsQJmJCYtGK9fWqfj5uV3H0OESVpTUzA0GiI9Bvw3XTpwQ97LOPxbQZJ26yf7XfebBeqofVLA/5VksT6/MQsowKn4x/PAxvfJPJrUiYjInBFcQNMj0HMz3lAxvqVp1iHP5ld0V8RfQrhhMAFn6zs+savaSLIa/JIWZU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535129; c=relaxed/simple; bh=zBZlx0wjsqPlQOblswtZCEKGNXCje4SP7Q13SvaCAiw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aHZZnPzgXh5iZm0gxquZGT9tfbougrZ12+1xpiv92Rc5mm6dOnLY+0A09GN62rrJ24+OhHNmGNUuyunVQnu+QpF9HQGp+WFNnXul6DN4VzTuIVOvCvA+/jXdDgvpAPmgaBLGRqz/VQ3tbFSt/lF+f7pKHsmlIDRI6qiWSHwXJ+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AXw0dapp; 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="AXw0dapp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06513C4CEDD; Wed, 26 Feb 2025 01:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535129; bh=zBZlx0wjsqPlQOblswtZCEKGNXCje4SP7Q13SvaCAiw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=AXw0dappWcdlEQpzoswUGRLR3c7+FvUMd480O4hmCOUsOflwXwTSbQ1iAPis8G/GD 2pSDleTSD2skNfQuSNVsNryc9aM0w+HPmmOSaHj1eiX2AqnO4U8mA3NVbyrm5jgXLI qSxem7eh9W4+9oSLTNcSYSoqA7pAFISQvXoGL4dE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49148: watch_queue: Free the page array when watch_queue is dismantled Date: Wed, 26 Feb 2025 02:55:53 +0100 Message-ID: <2025022608-CVE-2022-49148-88d2@gregkh> X-Mailer: git-send-email 2.48.1 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=3366; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=zBZlx0wjsqPlQOblswtZCEKGNXCje4SP7Q13SvaCAiw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Shy6ouSEEhNXH80+v+rcg8Ct1fWT6++sW+OaLJxss 3zrkntPOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiJ90Y5udMbD3ZcvhQ0pIl R07nLDsiplr9qYNhfsWui843njr2Bj/d9/P0N6HCqgSHHwA= 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: watch_queue: Free the page array when watch_queue is dismantled Commit 7ea1a0124b6d ("watch_queue: Free the alloc bitmap when the watch_queue is torn down") took care of the bitmap, but not the page array. BUG: memory leak unreferenced object 0xffff88810d9bc140 (size 32): comm "syz-executor335", pid 3603, jiffies 4294946994 (age 12.840s) hex dump (first 32 bytes): 40 a7 40 04 00 ea ff ff 00 00 00 00 00 00 00 00 @.@............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: kmalloc_array include/linux/slab.h:621 [inline] kcalloc include/linux/slab.h:652 [inline] watch_queue_set_size+0x12f/0x2e0 kernel/watch_queue.c:251 pipe_ioctl+0x82/0x140 fs/pipe.c:632 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] The Linux kernel CVE team has assigned CVE-2022-49148 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 5.10.110 with commit 7169f60110915c8b53bffd43741fa020a75eb87a Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 5.15.33 with commit 4913daecd04addb41bc96a9175a885e1c19862a8 Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 5.16.19 with commit 3963a5d1ff75585bddf0c3a918566a6be09d7520 Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 5.17.2 with commit 375cd2536494cfbcdda84ae8b3e35bf19d0250b9 Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 5.18 with commit b490207017ba237d97b735b2aa66dc241ccd18f5 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-2022-49148 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: kernel/watch_queue.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/7169f60110915c8b53bffd43741fa020a75eb87a https://git.kernel.org/stable/c/4913daecd04addb41bc96a9175a885e1c19862a8 https://git.kernel.org/stable/c/3963a5d1ff75585bddf0c3a918566a6be09d7520 https://git.kernel.org/stable/c/375cd2536494cfbcdda84ae8b3e35bf19d0250b9 https://git.kernel.org/stable/c/b490207017ba237d97b735b2aa66dc241ccd18f5