7.8high
RDMA/core: Fix ib block iterator counter overflow
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.20% (higher than 10% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: RDMA/core: Fix ib block iterator counter overflow When registering a new DMA MR after selecting the best aligned page size for it, we iterate over the given sglist to split each entry to smaller, aligned to the selected page size, DMA blocks. In given circumstances where the sg entry and page size fit certain sizes and the sg entry is not aligned to the selected page size, the total size of the aligned pages we need to cover the sg entry is >= 4GB. Under this circumstances, while iterating page aligned blocks, the counter responsible for counting how much we advanced from the start of the sg entry is overflowed because its type is u32 and we pass 4GB in size. This can lead to an infinite loop inside the iterator function because the overflow prevents the counter to be larger than the size of the sg entry. Fix the presented problem by changing the advancement condition to eliminate overflow. Backtrace: [ 192.374329] efa_reg_user_mr_dmabuf [ 192.376783] efa_register_mr [ 192.382579] pgsz_bitmap 0xfffff000 rounddown 0x80000000 [ 192.386423] pg_sz [0x80000000] umem_length[0xc0000000] [ 192.392657] start 0x0 length 0xc0000000 params.page_shift 31 params.page_num 3 [ 192.399559] hp_cnt[3], pages_in_hp[524288] [ 192.403690] umem->sgt_append.sgt.nents[1] [ 192.407905] number entries: [1], pg_bit: [31] [ 192.411397] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.415601] biter->__sg_advance [665837568] sg_dma_len[3221225472] [ 192.419823] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.423976] biter->__sg_advance [2813321216] sg_dma_len[3221225472] [ 192.428243] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.432397] biter->__sg_advance [665837568] sg_dma_len[3221225472]
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from a808273a495c657e33281b181fd7fcc2bb28f662 before 902063a9fea5f8252df392ade746bc9cfd07a5ae, from a808273a495c657e33281b181fd7fcc2bb28f662 before d66c1d4178c219b6e7d7a6f714e3e3656faccc36, from a808273a495c657e33281b181fd7fcc2bb28f662 before 362c9489720b31b6aa7491423ba65a4e98aa9838, from a808273a495c657e33281b181fd7fcc2bb28f662 before 43811d07ea64366af8ec9e168c558ec51440c39e, from a808273a495c657e33281b181fd7fcc2bb28f662 before 0afec5e9cea732cb47014655685a2a47fb180c31, 5.2 Not affected: before 5.2, from 5.4.231 up to 5.4.*, from 5.10.166 up to 5.10.*, from 5.15.91 up to 5.15.*, from 6.1.9 up to 6.1.*, from 6.2 up to * | CVE List |
| linux linux_kernel | from 5.2 before 5.4.231, from 5.5 before 5.10.166, from 5.11 before 5.15.91, from 5.16 before 6.1.9, 6.2 | NVD |
All scores
| Linux | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA-ADP | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: RDMA/core: Fix ib block iterator counter overflow When registering a new DMA MR after selecting the best aligned page size for it, we iterate over the given sglist to split each entry to smaller, aligned to the selected page size, DMA blocks. In given circumstances where the sg entry and page size fit certain sizes and the sg entry is not aligned to the selected page size, the total size of the aligned pages we need to cover the sg entry is >= 4GB. Under this circumstances, while iterating page aligned blocks, the counter responsible for counting how much we advanced from the start of the sg entry is overflowed because its type is u32 and we pass 4GB in size. This can lead to an infinite loop inside the iterator function because the overflow prevents the counter to be larger than the size of the sg entry. Fix the presented problem by changing the advancement condition to eliminate overflow. Backtrace: [ 192.374329] efa_reg_user_mr_dmabuf [ 192.376783] efa_register_mr [ 192.382579] pgsz_bitmap 0xfffff000 rounddown 0x80000000 [ 192.386423] pg_sz [0x80000000] umem_length[0xc0000000] [ 192.392657] start 0x0 length 0xc0000000 params.page_shift 31 params.page_num 3 [ 192.399559] hp_cnt[3], pages_in_hp[524288] [ 192.403690] umem->sgt_append.sgt.nents[1] [ 192.407905] number entries: [1], pg_bit: [31] [ 192.411397] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.415601] biter->__sg_advance [665837568] sg_dma_len[3221225472] [ 192.419823] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.423976] biter->__sg_advance [2813321216] sg_dma_len[3221225472] [ 192.428243] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.432397] biter->__sg_advance [665837568] sg_dma_len[3221225472]
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: RDMA/core: Fix ib block iterator counter overflow Al registrar un nuevo DMA MR después de seleccionar el mejor tamaño de página alineado para él, iteramos sobre la sglist dada para dividir cada entrada en bloques DMA más pequeños, alineados con el tamaño de página seleccionado. En determinadas circunstancias en las que la entrada sg y el tamaño de página se ajustan a ciertos tamaños y la entrada sg no está alineada con el tamaño de página seleccionado, el tamaño total de las páginas alineadas que necesitamos para cubrir la entrada sg es >= 4 GB. En estas circunstancias, al iterar bloques alineados de página, el contador responsable de contar cuánto avanzamos desde el inicio de la entrada sg se desborda porque su tipo es u32 y pasamos 4 GB de tamaño. Esto puede llevar a un bucle infinito dentro de la función del iterador porque el desbordamiento impide que el contador sea mayor que el tamaño de la entrada sg. Solucione el problema presentado cambiando la condición de avance para eliminar el desbordamiento. Backtrace: [ 192.374329] efa_reg_user_mr_dmabuf [ 192.376783] efa_register_mr [ 192.382579] pgsz_bitmap 0xfffff000 rounddown 0x80000000 [ 192.386423] pg_sz [0x80000000] umem_length[0xc0000000] [ 192.392657] start 0x0 length 0xc0000000 params.page_shift 31 params.page_num 3 [ 192.399559] hp_cnt[3], pages_in_hp[524288] [ 192.403690] umem->sgt_append.sgt.nents[1] [ 192.407905] number entries: [1], pg_bit: [31] [ 192.411397] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.415601] biter->__sg_advance [665837568] sg_dma_len[3221225472] [ 192.419823] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.423976] biter->__sg_advance [2813321216] sg_dma_len[3221225472] [ 192.428243] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.432397] biter->__sg_advance [665837568] sg_dma_len[3221225472]
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-53026 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2023-53026 changed 2026-08-04 | Public domain |