{"id":"CVE-2023-54238","summary":"mlx5: fix skb leak while fifo resync and push","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmlx5: fix skb leak while fifo resync and push\n\nDuring ptp resync operation SKBs were poped from the fifo but were never\nfreed neither by napi_consume nor by dev_kfree_skb_any. Add call to\nnapi_consume_skb to properly free SKBs.\n\nAnother leak was happening because mlx5e_skb_fifo_has_room() had an error\nin the check. Comparing free running counters works well unless C promotes\nthe types to something wider than the counter. In this case counters are\nu16 but the result of the substraction is promouted to int and it causes\nwrong result (negative value) of the check when producer have already\noverlapped but consumer haven't yet. Explicit cast to u16 fixes the issue.","modified":"2026-04-02T09:45:42.662286Z","published":"2025-12-30T12:11:27.702Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0317-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54238.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/234cffda95e1049f58e8ec136ef105c633f0ed19"},{"type":"WEB","url":"https://git.kernel.org/stable/c/68504c66d08c70fb92799722e25a932d311d74fd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e435941b1da1a0be4ff8a7ae425774c76a5ac514"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54238.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-54238"},{"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":"58a518948f60153e8f6cb8361d2712aa3a1af94a"},{"fixed":"234cffda95e1049f58e8ec136ef105c633f0ed19"},{"fixed":"68504c66d08c70fb92799722e25a932d311d74fd"},{"fixed":"e435941b1da1a0be4ff8a7ae425774c76a5ac514"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54238.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.1.18"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.2.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54238.json"}}],"schema_version":"1.7.5"}