Commit 74586c6
RDMA/irdma: Fix kernel stack leak in irdma_create_user_ah()
struct irdma_create_ah_resp { // 8 bytes, no padding
__u32 ah_id; // offset 0 - SET (uresp.ah_id = ah->sc_ah.ah_info.ah_idx)
__u8 rsvd[4]; // offset 4 - NEVER SET <- LEAK
};
rsvd[4]: 4 bytes of stack memory leaked unconditionally. Only ah_id is assigned before ib_respond_udata().
The reserved members of the structure were not zeroed.
Cc: [email protected]
Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>1 parent 117942c commit 74586c6
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5212 | 5212 | | |
5213 | 5213 | | |
5214 | 5214 | | |
5215 | | - | |
| 5215 | + | |
5216 | 5216 | | |
5217 | 5217 | | |
5218 | 5218 | | |
| |||
0 commit comments