{"id":"CVE-2026-139352","state":"PUBLISHED","title":"IB/mlx4: Avoid requeueing executing CM timeout work","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nIB/mlx4: Avoid requeueing executing CM timeout work\n\nid->scheduled_delete is set by schedule_delayed() itself.  It is used\nin two cases after the RTU timeout support was added:\n\n* A new id_map_entry is created, and a 60-second RTU timeout is\n  scheduled.\n* DREQ or REJ is received for an existing entry, and the normal\n  30-second teardown timeout is scheduled or adjusted.\n\nThe following race is possible when the RTU timeout expires while a\nDREQ or REJ is handled:\n\n CPU 0: timeout work                         CPU 1: DREQ/REJ handler\n --------------------                        -----------------------\n RTU timer expires\n timeout callback starts\n waits for id_map_lock                       takes id_map_lock\n\n                                             calls schedule_delayed()\n                                             calls mod_delayed_work()\n\n                                             drops id_map_lock\n\n takes id_map_lock\n removes mapping\n frees id_map_entry\n\n                                             requeued timeout runs\n                                             accesses freed id_map_entry\n\nmod_delayed_work() may requeue the work after the timeout callback has\nstarted.  The original timeout callback then frees the id_map_entry,\nleaving the requeued work with a dangling delayed_work pointer.\n\nWhen a timeout is already scheduled, first cancel its pending work.  A\nsuccessful cancellation means the callback has not started and the\ntimeout can safely be scheduled again.  If cancellation fails, the\ncallback is executing and will free the entry after id_map_lock is\nreleased; do not requeue it.\n\ncancel_delayed_work() is deliberately used instead of\ncancel_delayed_work_sync(), because the timeout callback may be waiting\nfor id_map_lock, which is held by the caller.","publishedAt":"2026-11-30T13:33:58.014Z","updatedAt":"2026-11-30T13:33:58.014Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fa09adf4231f6c19caa9f52c1a707e0da54cd94e","status":"affected","lessThan":"a66b4a19f3437fcba9a1fa21c052ff8183fb17b0","versionType":"git"},{"version":"fa09adf4231f6c19caa9f52c1a707e0da54cd94e","status":"affected","lessThan":"9bcf45bfcaf83aed81b5fb12f0edf4c16e73e02e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mlx4/cm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.3","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/hw/mlx4/cm.c"]}],"references":["https://git.kernel.org/stable/c/a66b4a19f3437fcba9a1fa21c052ff8183fb17b0","https://git.kernel.org/stable/c/9bcf45bfcaf83aed81b5fb12f0edf4c16e73e02e"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139352.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139352","state":"PUBLISHED","datePublished":"2026-11-30T13:33:58.014Z","dateUpdated":"2026-11-30T13:33:58.014Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.928Z"},"containers":{"cna":{"title":"IB/mlx4: Avoid requeueing executing CM timeout work","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nIB/mlx4: Avoid requeueing executing CM timeout work\n\nid->scheduled_delete is set by schedule_delayed() itself.  It is used\nin two cases after the RTU timeout support was added:\n\n* A new id_map_entry is created, and a 60-second RTU timeout is\n  scheduled.\n* DREQ or REJ is received for an existing entry, and the normal\n  30-second teardown timeout is scheduled or adjusted.\n\nThe following race is possible when the RTU timeout expires while a\nDREQ or REJ is handled:\n\n CPU 0: timeout work                         CPU 1: DREQ/REJ handler\n --------------------                        -----------------------\n RTU timer expires\n timeout callback starts\n waits for id_map_lock                       takes id_map_lock\n\n                                             calls schedule_delayed()\n                                             calls mod_delayed_work()\n\n                                             drops id_map_lock\n\n takes id_map_lock\n removes mapping\n frees id_map_entry\n\n                                             requeued timeout runs\n                                             accesses freed id_map_entry\n\nmod_delayed_work() may requeue the work after the timeout callback has\nstarted.  The original timeout callback then frees the id_map_entry,\nleaving the requeued work with a dangling delayed_work pointer.\n\nWhen a timeout is already scheduled, first cancel its pending work.  A\nsuccessful cancellation means the callback has not started and the\ntimeout can safely be scheduled again.  If cancellation fails, the\ncallback is executing and will free the entry after id_map_lock is\nreleased; do not requeue it.\n\ncancel_delayed_work() is deliberately used instead of\ncancel_delayed_work_sync(), because the timeout callback may be waiting\nfor id_map_lock, which is held by the caller."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fa09adf4231f6c19caa9f52c1a707e0da54cd94e","status":"affected","lessThan":"a66b4a19f3437fcba9a1fa21c052ff8183fb17b0","versionType":"git"},{"version":"fa09adf4231f6c19caa9f52c1a707e0da54cd94e","status":"affected","lessThan":"9bcf45bfcaf83aed81b5fb12f0edf4c16e73e02e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mlx4/cm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.3","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/hw/mlx4/cm.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a66b4a19f3437fcba9a1fa21c052ff8183fb17b0"},{"url":"https://git.kernel.org/stable/c/9bcf45bfcaf83aed81b5fb12f0edf4c16e73e02e"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:58.014Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}