Lv Yunlong bdc2ab5c61 net/rds: Fix a use after free in rds_message_map_pages
In rds_message_map_pages, the rm is freed by rds_message_put(rm).
But rm is still used by rm->data.op_sg in return value.

My patch assigns ERR_CAST(rm->data.op_sg) to err before the rm is
freed to avoid the uaf.

Fixes: 7dba92037baf3 ("net/rds: Use ERR_PTR for rds_message_alloc_sgs()")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-31 14:26:56 -07:00
..
2020-09-18 14:12:43 -07:00
2020-11-17 15:22:06 -04:00
2020-11-17 15:22:06 -04:00
2020-11-17 15:22:06 -04:00
2020-11-17 15:22:06 -04:00
2020-11-17 15:22:06 -04:00
2020-05-20 14:08:06 -07:00
2016-12-26 21:35:39 -05:00
2020-07-24 15:41:54 -07:00
2016-06-18 21:34:09 -07:00
2020-05-28 11:11:44 -07:00
2020-05-28 11:11:45 -07:00
2020-05-28 11:11:45 -07:00
2011-07-01 16:16:19 -07:00
2020-05-28 11:11:45 -07:00
2020-05-28 11:11:45 -07:00
2019-02-04 14:59:11 -08:00