This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nss/19837] New: nss_db: No retries for some long lines with a larger buffer
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 17 Mar 2016 18:02:12 +0000
- Subject: [Bug nss/19837] New: nss_db: No retries for some long lines with a larger buffer
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19837
Bug ID: 19837
Summary: nss_db: No retries for some long lines with a larger
buffer
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: nss
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Flags: security-
_nss_db_get*ent_r returns the wrong error code if parse_line fails. As a
result, only long lines which are large enough not to fit into the
caller-provided buffer result in ERANGE with NSS_STATUS_TRYAGAIN. If
parse_line detects that there is not enough room, NSS_STATUS_NOTFOUND is
returned, which stops enumeration.
Patch for later reference (I will post it to libc-alpha as well):
diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c
index 03c18d7..125a5e9 100644
--- a/nss/nss_db/db-XXX.c
+++ b/nss/nss_db/db-XXX.c
@@ -288,8 +288,8 @@ CONCAT(_nss_db_get,ENTNAME_r) (struct STRUCTURE *result,
char *buffer,
}
if (err < 0)
{
- H_ERRNO_SET (HOST_NOT_FOUND);
- status = NSS_STATUS_NOTFOUND;
+ H_ERRNO_SET (NETDB_INTERNAL);
+ status = NSS_STATUS_TRYAGAIN;
break;
}
--
You are receiving this mail because:
You are on the CC list for the bug.