Skip to content

Commit 508a03d

Browse files
0x36gerd-rausch
authored andcommitted
RDS: null pointer dereference in rds_atomic_free_op
set rm->atomic.op_active to 0 when rds_pin_pages() fails or the user supplied address is invalid, this prevents a NULL pointer usage in rds_atomic_free_op() Signed-off-by: Mohamed Ghannam <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit 7d11f77) CVE: CVE-2018-5333 Orabug: 28020561 Reviewed-by: Shan Hai <[email protected]> Signed-off-by: Allen Pais <[email protected]>
1 parent 14858a3 commit 508a03d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/rds/rdma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
844844
err:
845845
if (page)
846846
put_page(page);
847+
rm->atomic.op_active = 0;
847848
kfree(rm->atomic.op_notifier);
848849

849850
return ret;

0 commit comments

Comments
 (0)