{"id":"CVE-2023-53728","summary":"posix-timers: Ensure timer ID search-loop limit is valid","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nposix-timers: Ensure timer ID search-loop limit is valid\n\nposix_timer_add() tries to allocate a posix timer ID by starting from the\ncached ID which was stored by the last successful allocation.\n\nThis is done in a loop searching the ID space for a free slot one by\none. The loop has to terminate when the search wrapped around to the\nstarting point.\n\nBut that's racy vs. establishing the starting point. That is read out\nlockless, which leads to the following problem:\n\nCPU0\t  \t      \t     \t   CPU1\nposix_timer_add()\n  start = sig-\u003eposix_timer_id;\n  lock(hash_lock);\n  ...\t\t\t\t   posix_timer_add()\n  if (++sig-\u003eposix_timer_id \u003c 0)\n      \t\t\t             start = sig-\u003eposix_timer_id;\n     sig-\u003eposix_timer_id = 0;\n\nSo CPU1 can observe a negative start value, i.e. -1, and the loop break\nnever happens because the condition can never be true:\n\n  if (sig-\u003eposix_timer_id == start)\n     break;\n\nWhile this is unlikely to ever turn into an endless loop as the ID space is\nhuge (INT_MAX), the racy read of the start value caught the attention of\nKCSAN and Dmitry unearthed that incorrectness.\n\nRewrite it so that all id operations are under the hash lock.","modified":"2026-04-02T09:44:58.727327Z","published":"2025-10-22T13:23:57.127Z","related":["SUSE-SU-2025:21040-1","SUSE-SU-2025:21052-1","SUSE-SU-2025:21056-1","SUSE-SU-2025:21064-1","SUSE-SU-2025:4057-1","SUSE-SU-2025:4128-1","SUSE-SU-2025:4132-1","SUSE-SU-2025:4140-1","SUSE-SU-2025:4141-1","SUSE-SU-2025:4301-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53728.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/322377cc909defcca9451487484845e7e1d20d1b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/37175e25edf7cc0d5a2cd2c2a1cbe2dcbf4a1937"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6a0ac84501b4fec73a1a823c55cf13584c43f418"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8ad6679a5bb97cdb3e14942729292b4bfcc0e223"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8ce8849dd1e78dadcee0ec9acbd259d239b7069f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8dc52c200b889bc1cb34288fbf623d4ff381d2ae"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9ea26a8494a0a9337e7415eafd6f3ed940327dc5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ef535e0315afd098c4beb1da364847eca4b56a20"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53728.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53728"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5ed67f05f66c41e39880a6d61358438a25f9fee5"},{"fixed":"8dc52c200b889bc1cb34288fbf623d4ff381d2ae"},{"fixed":"9ea26a8494a0a9337e7415eafd6f3ed940327dc5"},{"fixed":"8ad6679a5bb97cdb3e14942729292b4bfcc0e223"},{"fixed":"322377cc909defcca9451487484845e7e1d20d1b"},{"fixed":"ef535e0315afd098c4beb1da364847eca4b56a20"},{"fixed":"6a0ac84501b4fec73a1a823c55cf13584c43f418"},{"fixed":"37175e25edf7cc0d5a2cd2c2a1cbe2dcbf4a1937"},{"fixed":"8ce8849dd1e78dadcee0ec9acbd259d239b7069f"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53728.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.10.0"},{"fixed":"4.14.322"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.15.0"},{"fixed":"4.19.291"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.20.0"},{"fixed":"5.4.251"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.188"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.150"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.107"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.4.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53728.json"}}],"schema_version":"1.7.5"}