Bug 1077884 - ldap/servers/slapd/back-ldbm/dblayer.c: possible minor problem with sscanf
Summary: ldap/servers/slapd/back-ldbm/dblayer.c: possible minor problem with sscanf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-18 19:02 UTC by Noriko Hosoi
Modified: 2015-03-05 09:34 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.3.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:34:04 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0416 normal SHIPPED_LIVE Important: 389-ds-base security, bug fix, and enhancement update 2015-03-05 14:26:33 UTC

Description Noriko Hosoi 2014-03-18 19:02:12 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47746

[ldap/servers/slapd/back-ldbm/dblayer.c:5294]: (warning) scanf without field width limits can crash with huge input data.

Source code is

    sscanf(thisline,"%[a-z]%c%s",attribute,&delimiter,value);

but

    char value[128], delimiter;

Maybe

    sscanf(thisline,"%[a-z]%c%128s",attribute,&delimiter,value);

would be better code.

Comment 4 Amita Sharma 2015-01-08 08:28:25 UTC
[root@dhcp201-126 ~]# /usr/lib64/dirsrv/slapd-dhcp201-126/stop-slapd [root@dhcp201-126 ~]# vim /var/lib/dirsrv/slapd-dhcp201-126/db/guardian 
[root@dhcp201-126 ~]# cp /var/lib/dirsrv/slapd-dhcp201-126/db/guardian /var/lib/dirsrv/slapd-dhcp201-126/db/guardian_bk
[root@dhcp201-126 ~]# vim /var/lib/dirsrv/slapd-dhcp201-126/db/guardian 
[root@dhcp201-126 ~]# /usr/lib64/dirsrv/slapd-dhcp201-126/start-slapd 
[root@dhcp201-126 ~]# cat /var/lib/dirsrv/slapd-dhcp201-126/db/guardian
cat: /var/lib/dirsrv/slapd-dhcp201-126/db/guardian: No such file or directory
[root@dhcp201-126 ~]# /usr/lib64/dirsrv/slapd-dhcp201-126/stop-slapd
[root@dhcp201-126 ~]# cat /var/lib/dirsrv/slapd-dhcp201-126/db/guardian
cachesize:5120000
ncache:0
version:5

Hence VERIFIED.

Comment 6 errata-xmlrpc 2015-03-05 09:34:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html


Note You need to log in before you can comment on or make changes to this bug.