{"id":"CVE-2026-143454","aliases":["EUVD-2026-145083","GHSA-h9r8-27rh-fppp"],"status":"published","title":"RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes\n\nCommit e91fb8b9d0ed (\"RDMA/mlx5: Avoid flexible array warning\") split\nthe leftovers_specs[] array into two separate structs to silence the\nsparse \"array of flexible structures\" warning, but in doing so reversed\nthe member order: eth_flow was placed before flow_attr.\n\n_create_flow_rule() locates the flow specs with:\n\n    ib_flow = (void *)flow_attr + sizeof(*flow_attr);\n\nwhich expects the spec data to immediately follow the ib_flow_attr.\nWith the reversed order, flow_attr is the last member, so ib_flow\npoints past the end of the struct and the num_of_specs = 1 loop reads\nout-of-bounds memory (whatever static data follows in the .data\nsection), producing incorrect flow rules or a crash.\n\nRebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares\nan on-stack struct ib_flow_attr with a properly sized trailing flows[]\narray.  The ETH spec lives in flows[0].eth at exactly the offset\n_create_flow_rule() expects, so no layout-dependent composite struct is\nneeded.  This also avoids embedding a structure that contains a flexible\narray member as a non-last member, which would trigger\n-Wflex-array-member-not-at-end once the warning is enabled.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-12-05T01:41:33Z","modified":"2026-12-05T03:30:37Z","fixes":[{"ecosystem":"Linux","package":"Kernel","fixed_in":["6.18.65","7.3.6"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Linux","package":"Kernel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.16.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}]}],"products":[{"vendor":"linux","product":"linux"}],"references":[{"url":"https://git.kernel.org/stable/c/2398e9e726cca24b2535ba2bb30ec088487602d7","tags":["web"]},{"url":"https://git.kernel.org/stable/c/4a8216314e864d94cbda0c5212aab3fa2020e64c","tags":["web"]},{"url":"https://git.kernel.org/stable/c/e43913aabd35eef837edef29e93f15e15bdeeacd","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143454","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-h9r8-27rh-fppp"},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143454.json","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-143454","title":"RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes\n\nCommit e91fb8b9d0ed (\"RDMA/mlx5: Avoid flexible array warning\") split\nthe leftovers_specs[] array into two separate structs to silence the\nsparse \"array of flexible structures\" warning, but in doing so reversed\nthe member order: eth_flow was placed before flow_attr.\n\n_create_flow_rule() locates the flow specs with:\n\n    ib_flow = (void *)flow_attr + sizeof(*flow_attr);\n\nwhich expects the spec data to immediately follow the ib_flow_attr.\nWith the reversed order, flow_attr is the last member, so ib_flow\npoints past the end of the struct and the num_of_specs = 1 loop reads\nout-of-bounds memory (whatever static data follows in the .data\nsection), producing incorrect flow rules or a crash.\n\nRebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares\nan on-stack struct ib_flow_attr with a properly sized trailing flows[]\narray.  The ETH spec lives in flows[0].eth at exactly the offset\n_create_flow_rule() expects, so no layout-dependent composite struct is\nneeded.  This also avoids embedding a structure that contains a flexible\narray member as a non-last member, which would trigger\n-Wflex-array-member-not-at-end once the warning is enabled.","status":"published","published":"2026-12-05T01:41:33.941Z","modified":"2026-12-05T01:41:33.941Z","updated_at":"2026-12-05T01:48:47.517798Z"}],"euvd":[{"id":"EUVD-2026-145083","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes\n\nCommit e91fb8b9d0ed (\"RDMA/mlx5: Avoid flexible array warning\") split\nthe leftovers_specs[] array into two separate structs to silence the\nsparse \"array of flexible structures\" warning, but in doing so reversed\nthe member order: eth_flow was placed before flow_attr.\n\n_create_flow_rule() locates the flow specs with:\n\n    ib_flow = (void *)flow_attr + sizeof(*flow_attr);\n\nwhich expects the spec data to immediately follow the ib_flow_attr.\nWith the reversed order, flow_attr is the last member, so ib_flow\npoints past the end of the struct and the num_of_specs = 1 loop reads\nout-of-bounds memory (whatever static data follows in the .data\nsection), producing incorrect flow rules or a crash.\n\nRebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares\nan on-stack struct ib_flow_attr with a properly sized trailing flows[]\narray.  The ETH spec lives in flows[0].eth at exactly the offset\n_create_flow_rule() expects, so no layout-dependent composite struct is\nneeded.  This also avoids embedding a structure that contains a flexible\narray member as a non-last member, which would trigger\n-Wflex-array-member-not-at-end once the warning is enabled.","status":"published","published":"2026-12-05T01:41:33Z","modified":"2026-12-05T01:41:33Z","updated_at":"2026-12-05T03:44:21.912352Z"}],"ghsa":[{"id":"GHSA-h9r8-27rh-fppp","title":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use...","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes\n\nCommit e91fb8b9d0ed (\"RDMA/mlx5: Avoid flexible array warning\") split\nthe leftovers_specs[] array into two separate structs to silence the\nsparse \"array of flexible structures\" warning, but in doing so reversed\nthe member order: eth_flow was placed before flow_attr.\n\n_create_flow_rule() locates the flow specs with:\n\n    ib_flow = (void *)flow_attr + sizeof(*flow_attr);\n\nwhich expects the spec data to immediately follow the ib_flow_attr.\nWith the reversed order, flow_attr is the last member, so ib_flow\npoints past the end of the struct and the num_of_specs = 1 loop reads\nout-of-bounds memory (whatever static data follows in the .data\nsection), producing incorrect flow rules or a crash.\n\nRebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares\nan on-stack struct ib_flow_attr with a properly sized trailing flows[]\narray.  The ETH spec lives in flows[0].eth at exactly the offset\n_create_flow_rule() expects, so no layout-dependent composite struct is\nneeded.  This also avoids embedding a structure that contains a flexible\narray member as a non-last member, which would trigger\n-Wflex-array-member-not-at-end once the warning is enabled.","status":"published","published":"2026-12-05T03:30:29Z","modified":"2026-12-05T03:30:37Z","updated_at":"2026-12-05T03:31:20.896926Z"}],"nvd":[{"id":"CVE-2026-143454","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes\n\nCommit e91fb8b9d0ed (\"RDMA/mlx5: Avoid flexible array warning\") split\nthe leftovers_specs[] array into two separate structs to silence the\nsparse \"array of flexible structures\" warning, but in doing so reversed\nthe member order: eth_flow was placed before flow_attr.\n\n_create_flow_rule() locates the flow specs with:\n\n    ib_flow = (void *)flow_attr + sizeof(*flow_attr);\n\nwhich expects the spec data to immediately follow the ib_flow_attr.\nWith the reversed order, flow_attr is the last member, so ib_flow\npoints past the end of the struct and the num_of_specs = 1 loop reads\nout-of-bounds memory (whatever static data follows in the .data\nsection), producing incorrect flow rules or a crash.\n\nRebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares\nan on-stack struct ib_flow_attr with a properly sized trailing flows[]\narray.  The ETH spec lives in flows[0].eth at exactly the offset\n_create_flow_rule() expects, so no layout-dependent composite struct is\nneeded.  This also avoids embedding a structure that contains a flexible\narray member as a non-last member, which would trigger\n-Wflex-array-member-not-at-end once the warning is enabled.","status":"published","published":"2026-12-05T03:19:57.813Z","modified":"2026-12-05T03:19:57.813Z","updated_at":"2026-12-05T03:21:31.003878Z"}],"osv":[{"id":"CVE-2026-143454","title":"RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes\n\nCommit e91fb8b9d0ed (\"RDMA/mlx5: Avoid flexible array warning\") split\nthe leftovers_specs[] array into two separate structs to silence the\nsparse \"array of flexible structures\" warning, but in doing so reversed\nthe member order: eth_flow was placed before flow_attr.\n\n_create_flow_rule() locates the flow specs with:\n\n    ib_flow = (void *)flow_attr + sizeof(*flow_attr);\n\nwhich expects the spec data to immediately follow the ib_flow_attr.\nWith the reversed order, flow_attr is the last member, so ib_flow\npoints past the end of the struct and the num_of_specs = 1 loop reads\nout-of-bounds memory (whatever static data follows in the .data\nsection), producing incorrect flow rules or a crash.\n\nRebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares\nan on-stack struct ib_flow_attr with a properly sized trailing flows[]\narray.  The ETH spec lives in flows[0].eth at exactly the offset\n_create_flow_rule() expects, so no layout-dependent composite struct is\nneeded.  This also avoids embedding a structure that contains a flexible\narray member as a non-last member, which would trigger\n-Wflex-array-member-not-at-end once the warning is enabled.","status":"published","published":"2026-12-05T01:41:33.941Z","modified":"2026-12-05T03:01:09.523186852Z","updated_at":"2026-12-05T03:12:24.891317Z"}]}}
