Descripción
En el kernel de Linux se resolvió la siguiente vulnerabilidad: svcrdma: rechazar respuestas inline que desbordan el búfer de pull-up. Un cliente RPC-over-RDMA puede solicitar una respuesta, como un payload NFS READ, sin proporcionar una Write list ni un Reply chunk para transportarla. Cuando dicha respuesta necesita más entradas scatter/gather de las que admite la Send Queue del dispositivo, svc_rdma_pull_up_needed() selecciona pull-up y svc_rdma_pull_up_reply_msg() linealiza toda la respuesta en sctxt->sc_xprt_buf. Ese búfer tiene solo sc_max_req_size bytes, mientras que la respuesta en esta ruta está limitada únicamente por la solicitud del cliente, por lo que svc_rdma_xb_linearize() copia más allá del final del búfer y corrompe memoria slab adyacente. La longitud sobredimensionada se almacena luego en sc_sges[0].length y se envía, por lo que el dispositivo también lee más allá de la región mapeada. La rama de agotamiento de SGE es la única ruta de pull-up que puede exceder el búfer: la rama de umbral solo aplica pull-up a respuestas menores que RPCRDMA_PULLUP_THRESH, y las respuestas que caben en el presupuesto de SGE del dispositivo se envían directamente sin linealización. La corrección hace que svc_rdma_pull_up_needed() informe -E2BIG cuando la respuesta que aplicaría pull-up no cabe en sc_max_req_size, y hace fallar la solicitud con ERR_CHUNK, como indica la sección 4.5.3 del RFC 8166, en lugar de cerrar la conexión. La función auxiliar ya no responde una simple pregunta de sí o no: ahora informa pull-up, sin pull-up o -E2BIG para una respuesta demasiado grande para linealizar. Se renombra svc_rdma_pull_up_needed() a svc_rdma_check_pull_up() para que su nombre ya no sugiera un predicado booleano.
Qué hacer
Revisa si usas el producto afectado y en qué versión, y aplica la actualización o la mitigación que indique el aviso del fabricante. CISA no ha confirmado que se esté explotando; si eso cambia, esta ficha pasa a «explotada» y te avisamos en el boletín.
Versiones afectadas
- Linux Afectadas: e248aa7be86e8179f20ac0931774ecd746f3f5bf y anteriores a b73011049dbe909f73fd9620d94ef1757d7af2eb · e248aa7be86e8179f20ac0931774ecd746f3f5bf y anteriores a 8068358f445a11296328ffa7c524701596814a17 · e248aa7be86e8179f20ac0931774ecd746f3f5bf y anteriores a fcd91b9957462d398792201c239dffaeff1cc8b2 · e248aa7be86e8179f20ac0931774ecd746f3f5bf y anteriores a 1949dd1576f7a8aa161b1330c6125df9d53046d5 · e248aa7be86e8179f20ac0931774ecd746f3f5bf y anteriores a 8ec60eb51fae37cd3d334ff26e4a7d6fb21ff7cf · e248aa7be86e8179f20ac0931774ecd746f3f5bf y anteriores a 0fbe20dfe74b783d255bf389a6ea77aa25dc7860 · 9b65b18f817d9ada2bf67351f24bdcce6789a0bb · d564356e1919d1178568c19af410cfc1a9076663 · 4.19.22 y anteriores a 4.20 · 4.20.9 y anteriores a 4.21
- Linux Afectadas: 5.0 No afectadas: 6.1.191 · 6.6.160 · 6.12.109 · 6.18.50 · 7.2.4 · 7.3
Según el registro de la vulnerabilidad en CVE.org, tal como lo publicó el fabricante. Confirma tu versión exacta en el aviso del fabricante.
Referencias
- Referencia en git.kernel.orggit.kernel.org/stable/c/b73011049dbe909f73fd9620d94ef1757d7af2eb
- Referencia en git.kernel.orggit.kernel.org/stable/c/8068358f445a11296328ffa7c524701596814a17
- Referencia en git.kernel.orggit.kernel.org/stable/c/fcd91b9957462d398792201c239dffaeff1cc8b2
- Referencia en git.kernel.orggit.kernel.org/stable/c/1949dd1576f7a8aa161b1330c6125df9d53046d5
- Referencia en git.kernel.orggit.kernel.org/stable/c/8ec60eb51fae37cd3d334ff26e4a7d6fb21ff7cf
- Referencia en git.kernel.orggit.kernel.org/stable/c/0fbe20dfe74b783d255bf389a6ea77aa25dc7860
Ver el texto original en inglés (CVE.org)
svcrdma: Reject inline replies that overflow the pull-up buffer
In the Linux kernel, the following vulnerability has been resolved: svcrdma: Reject inline replies that overflow the pull-up buffer An RPC-over-RDMA client can request a reply, such as an NFS READ payload, without providing a Write list or a Reply chunk to carry it. When such a reply needs more scatter/gather entries than the device's Send Queue supports, svc_rdma_pull_up_needed() selects pull-up and svc_rdma_pull_up_reply_msg() linearizes the whole reply into sctxt->sc_xprt_buf. That buffer is only sc_max_req_size bytes, while the reply on this path is bounded only by the client's request, so svc_rdma_xb_linearize() copies past the end of the buffer and corrupts adjacent slab memory. The oversized length is then stored in sc_sges[0].length and posted, so the device also reads beyond the mapped region. The SGE-exhaustion branch is the only pull-up path that can exceed the buffer: the threshold branch pulls up only replies smaller than RPCRDMA_PULLUP_THRESH, and replies that fit the device's SGE budget are sent directly without linearization. Make svc_rdma_pull_up_needed() report -E2BIG when the reply it would pull up cannot fit sc_max_req_size, and fail the request with ERR_CHUNK as RFC 8166 Section 4.5.3 directs rather than dropping the connection. The helper no longer answers a simple yes/no question: it now reports pull-up, no pull-up, or -E2BIG for a reply too large to linearize. Rename svc_rdma_pull_up_needed() to svc_rdma_check_pull_up() so its name no longer implies a boolean predicate.