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 CF8371D6195 for ; Mon, 8 Dec 2025 01:20:52 +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=1765156852; cv=none; b=mhqvatVfF3ppDG+uMIRPU9yH6vmCRGyP3LLsDLTaVN0X0GD43wFS+6OAWML/t7IU7Udw8I5u4pRr5IQt3guMIDHd1mf/zRn4boMPmYPhhn6EiS8/GZKX1D9+zEcgF6ACsEVsCuh86ro3SMxA8/WGVtqMw3lzbQ2LYJZoHinfz44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765156852; c=relaxed/simple; bh=9M2YOlYCZ1/nySvzL43aKSv8aqYJ2Uee1UE3Zrg37SA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CQtuqC4ymvAPH2hupiC/0qywhKyiQk1TpZf6P6kFDbjXIc6ULksEX1b5bYjIhFbvM1EB4h4PkU/eqoyS06Jex8aVea9ENO3Tl4JwHK5qElgGSvWZKmOcrxBgI3gVfT7yp0QLAdU/psRdMTusTkTVUA1vOJt7Ke9m9f5dFD3BIgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qJ4cCG/a; 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="qJ4cCG/a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38E7AC4CEFB; Mon, 8 Dec 2025 01:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765156852; bh=9M2YOlYCZ1/nySvzL43aKSv8aqYJ2Uee1UE3Zrg37SA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=qJ4cCG/av5+mPNFBetxgBc1ouvpjbZ4U56sPAOiu3ItFiQKdgGqjOYoU8qtQiOlA9 PN+XrbO1cheWnrwPi6BhvzcHSPe1VWeF6KSAbkfRuz2x+wr0+hiorHC91e3jRy/qaw vUp54SQvLrj6olJ2CnLzjpjpkRYqZSvtv3ezoHZo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53747: vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF Date: Mon, 8 Dec 2025 10:19:46 +0900 Message-ID: <2025120842-CVE-2023-53747-ae4a@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5991; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=x5FIGzcDj0IcBKK0mUCr0j7ZjuMaxrVRH8OB95sAuMQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlm6uvUnF9Kp8zYKJS4/NH/X8k9Sg6ln3YbPFhvPP/Z5 +ONqmbGHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR5wIMC9ZKKe8NLLHm2Zx8 +23+78fpu+ql/zLMj51w/nG4btDDFOFNxQ9vx7VunNO/HgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF After a call to console_unlock() in vcs_write() the vc_data struct can be freed by vc_port_destruct(). Because of that, the struct vc_data pointer must be reloaded in the while loop in vcs_write() after console_lock() to avoid a UAF when vcs_size() is called. Syzkaller reported a UAF in vcs_size(). BUG: KASAN: slab-use-after-free in vcs_size (drivers/tty/vt/vc_screen.c:215) Read of size 4 at addr ffff8880beab89a8 by task repro_vcs_size/4119 Call Trace: __asan_report_load4_noabort (mm/kasan/report_generic.c:380) vcs_size (drivers/tty/vt/vc_screen.c:215) vcs_write (drivers/tty/vt/vc_screen.c:664) vfs_write (fs/read_write.c:582 fs/read_write.c:564) ... Allocated by task 1213: kmalloc_trace (mm/slab_common.c:1064) vc_allocate (./include/linux/slab.h:559 ./include/linux/slab.h:680 drivers/tty/vt/vt.c:1078 drivers/tty/vt/vt.c:1058) con_install (drivers/tty/vt/vt.c:3334) tty_init_dev (drivers/tty/tty_io.c:1303 drivers/tty/tty_io.c:1415 drivers/tty/tty_io.c:1392) tty_open (drivers/tty/tty_io.c:2082 drivers/tty/tty_io.c:2128) chrdev_open (fs/char_dev.c:415) do_dentry_open (fs/open.c:921) vfs_open (fs/open.c:1052) ... Freed by task 4116: kfree (mm/slab_common.c:1016) vc_port_destruct (drivers/tty/vt/vt.c:1044) tty_port_destructor (drivers/tty/tty_port.c:296) tty_port_put (drivers/tty/tty_port.c:312) vt_disallocate_all (drivers/tty/vt/vt_ioctl.c:662 (discriminator 2)) vt_ioctl (drivers/tty/vt/vt_ioctl.c:903) tty_ioctl (drivers/tty/tty_io.c:2778) ... The buggy address belongs to the object at ffff8880beab8800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 424 bytes inside of freed 1024-byte region [ffff8880beab8800, ffff8880beab8c00) The buggy address belongs to the physical page: page:00000000afc77580 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xbeab8 head:00000000afc77580 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) page_type: 0xffffffff() raw: 000fffffc0010200 ffff888100042dc0 ffffea000426de00 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880beab8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880beab8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880beab8980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880beab8a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880beab8a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Disabling lock debugging due to kernel taint The Linux kernel CVE team has assigned CVE-2023-53747 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 4.14.327 with commit 934de9a9b659785fed3e820bc0c813a460c71fea Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 4.19.284 with commit 0deff678157333d775af190f84696336cdcccd6d Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 5.4.244 with commit a4e3c4c65ae8510e01352c9a4347e05c035b2ce2 Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 5.10.181 with commit 11dddfbb7a4e62489b01074d6c04d9d1b42e4047 Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 5.15.113 with commit e3d1adcad5b73c7ed0c7edb35ab68abcaa45cf67 Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 6.1.30 with commit 3338d0b9acde770ee588eead5cac32c25e7048fc Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 6.3.4 with commit 1de42e7653d6714a7507ba6696151a1fa028c69f Issue introduced in 2.6.38 with commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff and fixed in 6.4 with commit 8fb9ea65c9d1338b0d2bb0a9122dc942cdd32357 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-2023-53747 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/tty/vt/vc_screen.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/934de9a9b659785fed3e820bc0c813a460c71fea https://git.kernel.org/stable/c/0deff678157333d775af190f84696336cdcccd6d https://git.kernel.org/stable/c/a4e3c4c65ae8510e01352c9a4347e05c035b2ce2 https://git.kernel.org/stable/c/11dddfbb7a4e62489b01074d6c04d9d1b42e4047 https://git.kernel.org/stable/c/e3d1adcad5b73c7ed0c7edb35ab68abcaa45cf67 https://git.kernel.org/stable/c/3338d0b9acde770ee588eead5cac32c25e7048fc https://git.kernel.org/stable/c/1de42e7653d6714a7507ba6696151a1fa028c69f https://git.kernel.org/stable/c/8fb9ea65c9d1338b0d2bb0a9122dc942cdd32357