RDS: null pointer dereference in rds_atomic_free_op
Subsystems (4)
PATCH 1/1 RDS: null pointer dereference in rds_atomic_free_op
From: Mohamed Ghannam <[email protected]>
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()
--- net/rds/rdma.c | 1 + 1 file changed, 1 insertion(+)
net/rds/rdma.c +1 -0
@@ -874,6 +874,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, err:if (page)put_page (page); + rm->atomic.op_active =0 ;kfree (rm->atomic.op_notifier);return ret;
Signature · 1 line
2.14.1
A message that is not in the archive (sent off-list or not yet received): 5a4d45ce.8b8a1c0a.1d072.e5e1-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org
Santosh Shilimkar
Acked-byQuoted 8 lines · On 1/3/2018 1:06 PM, [email protected] wrote:
From: Mohamed Ghannam <[email protected]>
set
rm->atomic.op_activeto 0 whenrds_pin_pages()fails or the user supplied address is invalid,
this prevents a NULL pointer usage inrds_atomic_free_op()Signed-off-by Mohamed Ghannam <[email protected]>---
Good catch !!
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerFrom: [email protected]
Date: Wed, 3 Jan 2018 21:06:06 +0000
Quoted 7 lines
From: Mohamed Ghannam <[email protected]>
set
rm->atomic.op_activeto 0 whenrds_pin_pages()fails or the user supplied address is invalid,
this prevents a NULL pointer usage inrds_atomic_free_op()Signed-off-by Mohamed Ghannam <[email protected]>
Applied and queued up for -stable, thanks.