[PATCH] xfrm: Fix potential NULL dereference

Thomas Haller thaller at redhat.com
Tue May 12 04:15:16 PDT 2015


On Mon, 2015-05-11 at 14:49 +0200, Tobias Klauser wrote:
> If xfrmnl_sel_alloc() returns NULL, the daddr and saddr members are
> still accessed, leading to a potential NULL dereference. The same is the
> case for xfrmnl_user_tmpl_alloc(). Fix this by returning NULL right away
> if allocation fails.
> 
> Signed-off-by: Tobias Klauser <tklauser at distanz.ch>
> ---
>  lib/xfrm/selector.c | 5 +++--
>  lib/xfrm/template.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)


Hi Tobias,


merged as
https://github.com/thom311/libnl/commit/4e115113c9e9fa391c177dfc113eceaf0a9cb8b4


Thank you!!
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20150512/f2c2686d/attachment.sig>


More information about the libnl mailing list