GNU bug report logs -
#19890
[PATCH] Use after free in dld_link on error path
Previous Next
Reported by: Tobias Stoeckmann <tobias <at> stoeckmann.org>
Date: Tue, 17 Feb 2015 21:44:02 UTC
Severity: normal
Tags: patch
Fixed in version 2.4.6.25
Done: Pavel Raiskup <praiskup <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
In contrast to previous mail, only check for strdup NULL value.
The FREE macro properly sets module to NULL, therefore this one is
the only issue left.
---
Sorry for the previous noise.
---
libltdl/loaders/dld_link.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libltdl/loaders/dld_link.c b/libltdl/loaders/dld_link.c
index a73880f..54053ee 100644
--- a/libltdl/loaders/dld_link.c
+++ b/libltdl/loaders/dld_link.c
@@ -112,7 +112,11 @@ vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
{
lt_module module = lt__strdup (filename);
- if (dld_link (filename) != 0)
+ if (module == NULL)
+ {
+ LT__SETERROR (NO_MEMORY);
+ }
+ else if (dld_link (filename) != 0)
{
LT__SETERROR (CANNOT_OPEN);
FREE (module);
--
2.3.0
This bug report was last modified 9 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.