{"id":"CVE-2022-49814","aliases":["CVE-2022-49814"],"related":[],"kind":"vulnerability","state":"published","title":"kcm: close race conditions on sk_receive_queue","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nkcm: close race conditions on sk_receive_queue\n\nsk->sk_receive_queue is protected by skb queue lock, but for KCM\nsockets its RX path takes mux->rx_lock to protect more than just\nskb queue. However, kcm_recvmsg() still only grabs the skb queue\nlock, so race conditions still exist.\n\nWe can teach kcm_recvmsg() to grab mux->rx_lock too but this would\nintroduce a potential performance regression as struct kcm_mux can\nbe shared by multiple KCM sockets.\n\nSo we have to enforce skb queue lock in requeue_rx_msgs() and handle\nskb peek case carefully in kcm_wait_data(). Fortunately,\nskb_recv_datagram() already handles it nicely and is widely used by\nother sockets, we can just switch to skb_recv_datagram() after\ngetting rid of the unnecessary sock lock in kcm_recvmsg() and\nkcm_splice_read(). Side note: SOCK_DONE is not used by KCM sockets,\nso it is safe to get rid of this check too.\n\nI ran the original syzbot reproducer for 30 min without seeing any\nissue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nkcm: close race conditions on sk_receive_queue\n\nsk->sk_receive_queue is protected by skb queue lock, but for KCM\nsockets its RX path takes mux->rx_lock to protect more than just\nskb queue. However, kcm_recvmsg() still only grabs the skb queue\nlock, so race conditions still exist.\n\nWe can teach kcm_recvmsg() to grab mux->rx_lock too but this would\nintroduce a potential performance regression as struct kcm_mux can\nbe shared by multiple KCM sockets.\n\nSo we have to enforce skb queue lock in requeue_rx_msgs() and handle\nskb peek case carefully in kcm_wait_data(). Fortunately,\nskb_recv_datagram() already handles it nicely and is widely used by\nother sockets, we can just switch to skb_recv_datagram() after\ngetting rid of the unnecessary sock lock in kcm_recvmsg() and\nkcm_splice_read(). Side note: SOCK_DONE is not used by KCM sockets,\nso it is safe to get rid of this check too.\n\nI ran the original syzbot reproducer for 30 min without seeing any\nissue.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: kcm: condiciones de ejecución cerradas en sk_receive_queue. sk-&gt;sk_receive_queue está protegido por el bloqueo de cola skb, pero para los sockets KCM su ruta RX toma mux-&gt;rx_lock para proteger más que solo la cola skb. Sin embargo, kcm_recvmsg() todavía solo captura el bloqueo de cola skb, por lo que las condiciones de ejecución aún existen. Podemos enseñar a kcm_recvmsg() a capturar también mux-&gt;rx_lock, pero esto introduciría una posible regresión del rendimiento, ya que la estructura kcm_mux puede ser compartida por varios sockets KCM. Por lo tanto, debemos aplicar el bloqueo de cola skb en requeue_rx_msgs() y manejar el caso de skb peek con cuidado en kcm_wait_data(). Afortunadamente, skb_recv_datagram() ya lo gestiona correctamente y es ampliamente utilizado por otros sockets. Podemos cambiar a skb_recv_datagram() tras eliminar el bloqueo de sock innecesario en kcm_recvmsg() y kcm_splice_read(). Nota: Los sockets KCM no utilizan SOCK_DONE, por lo que también es seguro omitir esta comprobación. Ejecuté el reproductor syzbot original durante 30 minutos sin observar ningún problema.","source":"nvd"}],"published":"2025-05-01T14:09:38.389Z","modified":"2026-08-05T08:56:23.170Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"22f6b5d47396b4287662668ee3f5c1f766cb4259","status":"affected"},{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"d9ad4de92e184b19bcae4da10dac0275abf83931","status":"affected"},{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"ce57d6474ae999a3b2d442314087473a646a65c7","status":"affected"},{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"4154b6afa2bd639214ff259d912faad984f7413a","status":"affected"},{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"f7b0e95071bb4be4b811af3f0bfc3e200eedeaa3","status":"affected"},{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"bf92e54597d842da127c59833b365d6faeeaf020","status":"affected"},{"type":"git","introduced":"ab7ac4eb9832e32a09f4e8042705484d2fb0aad3","fixed":"5121197ecc5db58c07da95eb1ff82b98b121a221","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.6","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.6","status":"unaffected"},{"type":"semver","introduced":"4.14.300","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.267","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.225","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.156","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.80","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.10","lastAffected":"6.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.6","fixed":"4.14.300"},{"status":"affected","introduced":"4.15","fixed":"4.19.267"},{"status":"affected","introduced":"4.20","fixed":"5.4.225"},{"status":"affected","introduced":"5.5","fixed":"5.10.156"},{"status":"affected","introduced":"5.11","fixed":"5.15.80"},{"status":"affected","introduced":"5.16","fixed":"6.0.10"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/22f6b5d47396b4287662668ee3f5c1f766cb4259","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d9ad4de92e184b19bcae4da10dac0275abf83931","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ce57d6474ae999a3b2d442314087473a646a65c7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4154b6afa2bd639214ff259d912faad984f7413a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f7b0e95071bb4be4b811af3f0bfc3e200eedeaa3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bf92e54597d842da127c59833b365d6faeeaf020","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5121197ecc5db58c07da95eb1ff82b98b121a221","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49814","url":"https://www.cve.org/CVERecord?id=CVE-2022-49814","licence":"CVE Terms of Use","modified":"2026-08-05T08:56:23.170Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49814","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49814","licence":"Public domain","modified":"2026-08-04T10:17:56.803Z"}],"updatedAt":"2026-11-25T22:58:20.883Z","epss":{"score":0.00166,"percentile":0.06115,"date":"2026-12-01T12:00:22.000Z"}}