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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 18 Sep 2017 11:09:52 +0200 From: Greg Kroah-Hartman <gregkh@...uxfoundation.org> To: linux-kernel@...r.kernel.org Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, stable@...r.kernel.org, Christophe JAILLET <christophe.jaillet@...adoo.fr>, Vishal Verma <vishal.l.verma@...el.com>, Dan Williams <dan.j.williams@...el.com> Subject: [PATCH 4.13 24/52] libnvdimm, btt: check memory allocation failure 4.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe Jaillet <christophe.jaillet@...adoo.fr> commit ed36b4dba54a421ce5551638f6a9790b2c2116b1 upstream. Check memory allocation failures and return -ENOMEM in such cases, as already done few lines below for another memory allocation. This avoids NULL pointers dereference. Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format") Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr> Reviewed-by: Vishal Verma <vishal.l.verma@...el.com> Signed-off-by: Dan Williams <dan.j.williams@...el.com> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org> --- drivers/nvdimm/btt.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1429,6 +1429,8 @@ int nvdimm_namespace_attach_btt(struct n } btt_sb = devm_kzalloc(&nd_btt->dev, sizeof(*btt_sb), GFP_KERNEL); + if (!btt_sb) + return -ENOMEM; /* * If this returns < 0, that is ok as it just means there wasn't
Powered by blists - more mailing lists