lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <4CD85245.9090409@oracle.com> Date: Mon, 08 Nov 2010 11:40:53 -0800 From: Andy Grover <andy.grover@...cle.com> To: Pavel Emelyanov <xemul@...allels.com> CC: David Miller <davem@...emloft.net>, rds-devel@....oracle.com, Linux Netdev List <netdev@...r.kernel.org> Subject: Re: [PATCH] rds: Fix rds message leak in rds_message_map_pages On 11/08/2010 08:20 AM, Pavel Emelyanov wrote: > The sgs allocation error path leaks the allocated message. > > Signed-off-by: Pavel Emelyanov<xemul@...nvz.org> > > --- > > diff --git a/net/rds/message.c b/net/rds/message.c > index 848cff4..1fd3d29 100644 > --- a/net/rds/message.c > +++ b/net/rds/message.c > @@ -249,8 +249,10 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in > rm->m_inc.i_hdr.h_len = cpu_to_be32(total_len); > rm->data.op_nents = ceil(total_len, PAGE_SIZE); > rm->data.op_sg = rds_message_alloc_sgs(rm, num_sgs); > - if (!rm->data.op_sg) > + if (!rm->data.op_sg) { > + rds_message_put(rm); > return ERR_PTR(-ENOMEM); > + } > > for (i = 0; i< rm->data.op_nents; ++i) { > sg_set_page(&rm->data.op_sg[i], Acked-by: Andy Grover <andy.grover@...cle.com> -- Andy -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists