{"id":"CVE-2026-139288","state":"PUBLISHED","title":"RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()\n\nrxe_rcv() puts pkt->qp at its drop label, but leaves pkt->qp\nuninitialized on the two paths that take an early goto:\n\n\tif (unlikely(skb->len < RXE_BTH_BYTES))\n\t\tgoto drop;\n\n\tif (rxe_chk_dgid(rxe, skb) < 0)\n\t\tgoto drop;\n\n\tpkt->opcode = bth_opcode(pkt);\n\tpkt->psn = bth_psn(pkt);\n\tpkt->qp = NULL;\t\t<- too late for the gotos above\n\t...\ndrop:\n\tif (pkt->qp)\n\t\trxe_put(pkt->qp);\n\npkt points into skb->cb, which rxe does not own at this point: the\nnetwork stack has used that space for its own state.  For IPv6,\nip6_rcv_core() memsets inet6_skb_parm and then writes\n\n\tIP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);\n\nat offset 14, so the qword at cb + 8, which is where pkt->qp lives,\nreads back as 0x0006000000000000 for every IPv6 packet.\n\nAny IPv6 datagram to port 4791 whose payload is shorter than the BTH\ntakes the first goto and reaches the drop label with that value, so\nrxe_put() runs refcount_dec_and_test() on 0x0006000000000150 and the\nkernel faults, in softirq, on a non-canonical address:\n\n\tgeneral protection fault, probably for non-canonical address\n\t0x0006000000000150: 0000 [#1] PREEMPT SMP\n\tRIP: 0010:__rxe_put+0x.../...\n\tCall Trace:\n\t <IRQ>\n\t rxe_rcv+0x.../... [rdma_rxe]\n\t rxe_udp_encap_recv+0x.../... [rdma_rxe]\n\t udp_queue_rcv_one_skb\n\t ...\n\tKernel panic - not syncing: Fatal exception in interrupt\n\nThe fault happens in softirq, so it panics even with panic_on_oops=0,\nand with panic=0 the machine hangs until it is power cycled.  A remote\nsender only needs to send an empty UDP datagram to port 4791; no RDMA\nconnection, GID or other state is involved and the rxe socket is bound\nin init_net.\n\nIPv4 is not affected: ip_rcv_core() memsets the whole inet_skb_parm, so\nthe pkt->qp slot is zero there.\n\nFix by clearing pkt->qp before the first early exit.  pkt->qp is only\never assigned a reference-owning value by hdr_check() and\nrxe_rcv_mcast_pkt(), both of which run after this point, so the put at\nthe drop label stays balanced.\n\nThe ordering has been unsafe since the driver was merged: the two early\ngotos have preceded pkt->qp = NULL in every version since 8700e3e7c485.\n\nTesting done: the driver was built and run on a 6.2 vendor tree that\ncarries this code, where a single 0-byte IPv6 datagram to port 4791\nreproduced the panic above (that tree does not pull the UDP header in\nrxe_udp_encap_recv(), so payloads of 0..3 bytes reach the first goto\nthere, versus 0..11 on mainline).  With this change, the same packets\nare dropped as intended and tracing the drop label shows pkt->qp is 0\non every path that reaches it.  Not done: the mainline tree was not\nbuilt in the environment used to prepare this, and the reproducer is\nleft out of this message on purpose - both are available on request.","publishedAt":"2026-11-30T13:33:22.151Z","updatedAt":"2026-11-30T13:33:22.151Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"01b8c1cb0504b1f03850bf7b6a30c532508a4177","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"545ae9f2702c5ea6999c92558f5b0733f38fc83c","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"fc4959ae561c625f0960e526d9f5fcb11125249c","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"6b3dc360387a343fac825ae74da67de01a662cd8","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"9d370d6492653df247fe3df41d08a07792ae4cae","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"c8b2b063f7bf0f9e5cc272b61db79a9525f9f97d","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"2c2e0650b71be23998d7370fc439f7a5ec0eab80","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"7d7214b39b14c9763c14445b139f63369063b65e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rxe/rxe_recv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.8","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rxe/rxe_recv.c"]}],"references":["https://git.kernel.org/stable/c/01b8c1cb0504b1f03850bf7b6a30c532508a4177","https://git.kernel.org/stable/c/545ae9f2702c5ea6999c92558f5b0733f38fc83c","https://git.kernel.org/stable/c/fc4959ae561c625f0960e526d9f5fcb11125249c","https://git.kernel.org/stable/c/6b3dc360387a343fac825ae74da67de01a662cd8","https://git.kernel.org/stable/c/9d370d6492653df247fe3df41d08a07792ae4cae","https://git.kernel.org/stable/c/c8b2b063f7bf0f9e5cc272b61db79a9525f9f97d","https://git.kernel.org/stable/c/2c2e0650b71be23998d7370fc439f7a5ec0eab80","https://git.kernel.org/stable/c/7d7214b39b14c9763c14445b139f63369063b65e"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139288.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139288","state":"PUBLISHED","datePublished":"2026-11-30T13:33:22.151Z","dateUpdated":"2026-11-30T13:33:22.151Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.925Z"},"containers":{"cna":{"title":"RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()\n\nrxe_rcv() puts pkt->qp at its drop label, but leaves pkt->qp\nuninitialized on the two paths that take an early goto:\n\n\tif (unlikely(skb->len < RXE_BTH_BYTES))\n\t\tgoto drop;\n\n\tif (rxe_chk_dgid(rxe, skb) < 0)\n\t\tgoto drop;\n\n\tpkt->opcode = bth_opcode(pkt);\n\tpkt->psn = bth_psn(pkt);\n\tpkt->qp = NULL;\t\t<- too late for the gotos above\n\t...\ndrop:\n\tif (pkt->qp)\n\t\trxe_put(pkt->qp);\n\npkt points into skb->cb, which rxe does not own at this point: the\nnetwork stack has used that space for its own state.  For IPv6,\nip6_rcv_core() memsets inet6_skb_parm and then writes\n\n\tIP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);\n\nat offset 14, so the qword at cb + 8, which is where pkt->qp lives,\nreads back as 0x0006000000000000 for every IPv6 packet.\n\nAny IPv6 datagram to port 4791 whose payload is shorter than the BTH\ntakes the first goto and reaches the drop label with that value, so\nrxe_put() runs refcount_dec_and_test() on 0x0006000000000150 and the\nkernel faults, in softirq, on a non-canonical address:\n\n\tgeneral protection fault, probably for non-canonical address\n\t0x0006000000000150: 0000 [#1] PREEMPT SMP\n\tRIP: 0010:__rxe_put+0x.../...\n\tCall Trace:\n\t <IRQ>\n\t rxe_rcv+0x.../... [rdma_rxe]\n\t rxe_udp_encap_recv+0x.../... [rdma_rxe]\n\t udp_queue_rcv_one_skb\n\t ...\n\tKernel panic - not syncing: Fatal exception in interrupt\n\nThe fault happens in softirq, so it panics even with panic_on_oops=0,\nand with panic=0 the machine hangs until it is power cycled.  A remote\nsender only needs to send an empty UDP datagram to port 4791; no RDMA\nconnection, GID or other state is involved and the rxe socket is bound\nin init_net.\n\nIPv4 is not affected: ip_rcv_core() memsets the whole inet_skb_parm, so\nthe pkt->qp slot is zero there.\n\nFix by clearing pkt->qp before the first early exit.  pkt->qp is only\never assigned a reference-owning value by hdr_check() and\nrxe_rcv_mcast_pkt(), both of which run after this point, so the put at\nthe drop label stays balanced.\n\nThe ordering has been unsafe since the driver was merged: the two early\ngotos have preceded pkt->qp = NULL in every version since 8700e3e7c485.\n\nTesting done: the driver was built and run on a 6.2 vendor tree that\ncarries this code, where a single 0-byte IPv6 datagram to port 4791\nreproduced the panic above (that tree does not pull the UDP header in\nrxe_udp_encap_recv(), so payloads of 0..3 bytes reach the first goto\nthere, versus 0..11 on mainline).  With this change, the same packets\nare dropped as intended and tracing the drop label shows pkt->qp is 0\non every path that reaches it.  Not done: the mainline tree was not\nbuilt in the environment used to prepare this, and the reproducer is\nleft out of this message on purpose - both are available on request."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"01b8c1cb0504b1f03850bf7b6a30c532508a4177","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"545ae9f2702c5ea6999c92558f5b0733f38fc83c","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"fc4959ae561c625f0960e526d9f5fcb11125249c","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"6b3dc360387a343fac825ae74da67de01a662cd8","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"9d370d6492653df247fe3df41d08a07792ae4cae","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"c8b2b063f7bf0f9e5cc272b61db79a9525f9f97d","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"2c2e0650b71be23998d7370fc439f7a5ec0eab80","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","status":"affected","lessThan":"7d7214b39b14c9763c14445b139f63369063b65e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rxe/rxe_recv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.8","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rxe/rxe_recv.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/01b8c1cb0504b1f03850bf7b6a30c532508a4177"},{"url":"https://git.kernel.org/stable/c/545ae9f2702c5ea6999c92558f5b0733f38fc83c"},{"url":"https://git.kernel.org/stable/c/fc4959ae561c625f0960e526d9f5fcb11125249c"},{"url":"https://git.kernel.org/stable/c/6b3dc360387a343fac825ae74da67de01a662cd8"},{"url":"https://git.kernel.org/stable/c/9d370d6492653df247fe3df41d08a07792ae4cae"},{"url":"https://git.kernel.org/stable/c/c8b2b063f7bf0f9e5cc272b61db79a9525f9f97d"},{"url":"https://git.kernel.org/stable/c/2c2e0650b71be23998d7370fc439f7a5ec0eab80"},{"url":"https://git.kernel.org/stable/c/7d7214b39b14c9763c14445b139f63369063b65e"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:22.151Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}