{"id":"CVE-2026-139356","summary":"RDMA/rxe: validate inline sge_offset in finish_packet() before indexing inline_data[]","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: validate inline sge_offset in finish_packet() before indexing inline_data[]\n\nFor a user QP, rxe_post_send() takes the qp-\u003eis_user branch and\nnever runs init_send_wqe(), so\ndma.length/resid/num_sge/cur_sge/sge_offset all come straight from\nthe mmap'd SQ ring. In the inline send path finish_packet() uses\nsge_offset directly as an index:\n\n\tu8 *tmp = &wqe-\u003edma.inline_data[wqe-\u003edma.sge_offset];\n\tmemcpy(payload_addr(pkt), tmp, payload);\n\ninline_data is a flex array whose capacity is qp-\u003esq.max_inline, but\nsge_offset is a u32 from user space, so the source pointer is\ndisplaced arbitrarily past the WQE and the memcpy reads out of\nbounds.\ncommit 126c757e4cd4 (\"RDMA/rxe: Validate num_sge/cur_sge before indexing wqe-\u003edma.sge[]\")\nadded num_sge/cur_sge checks on the send path but not sge_offset, the\nthird attacker-controlled index in the same struct.\n\nRead sge_offset once with READ_ONCE() and bound it (and the payload\nthat follows it) by qp-\u003esq.max_inline before indexing, so the value\nthat is validated is the value that is used.","modified":"2026-12-01T07:00:35.896097670Z","published":"2026-11-30T13:34:00.214Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139356.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/01e79cab51d9a75815a57f5dfb7c8cefe8e88ea7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1706290f1a8de07a29c1b1e6bb61048699c578e2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1d77fd886b4757388246bb8ab2fb805b72ddaed0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/47a9c0338f2e0d4178d77b0d2f529fe1fde84642"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5c231af4a0d14c125d7120f500ab71cd251cab36"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a99c5a54227ba60c4c8e26a570d6d724c39f6ae1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d7bc85182be87f8a4a5418f12e3378d790cae630"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139356.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139356"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76"},{"fixed":"d7bc85182be87f8a4a5418f12e3378d790cae630"},{"fixed":"5c231af4a0d14c125d7120f500ab71cd251cab36"},{"fixed":"1706290f1a8de07a29c1b1e6bb61048699c578e2"},{"fixed":"a99c5a54227ba60c4c8e26a570d6d724c39f6ae1"},{"fixed":"01e79cab51d9a75815a57f5dfb7c8cefe8e88ea7"},{"fixed":"1d77fd886b4757388246bb8ab2fb805b72ddaed0"},{"fixed":"47a9c0338f2e0d4178d77b0d2f529fe1fde84642"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139356.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.8.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.119"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139356.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"}]}