Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 982325

Summary: Overflow in nsslapd-disk-monitoring-threshold
Product: Red Hat Enterprise Linux 6 Reporter: Ján Rusnačko <jrusnack>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Sankar Ramalingam <sramling>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.4CC: jgalipea, jwest, mreynolds, nhosoi, nkinder
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.11.15-24.el6 Doc Type: Bug Fix
Doc Text:
Cause: The wrong variable integer type was used that lead to a overflow of the value(making it a negative value) Consequence: The wrong value was set in the feature configuration. Fix: Use the correct variable type. Result: The correct value is displayed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 21:10:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 984970    

Description Ján Rusnačko 2013-07-08 16:52:06 UTC
Description of problem:
When nsslapd-disk-monitoring-threshold is set too high, it overflows to negative numbers.

Version-Release number of selected component (if applicable):
389-ds-base-1.2.11.15-16.el6_4.x86_64

How reproducible:
always

Steps to Reproduce:
1. ldapmodify -h localhost -p 389 -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: 3000000000
EOF

2. ldapsearch -h localhost -p 22139 -D "cn=directory manager" -w Secret123 -b "cn=config" -LLL -s base nsslapd-disk-monitoring-threshold
dn: cn=config
nsslapd-disk-monitoring-threshold: -1294967296

Actual results:
nsslapd-disk-monitoring-threshold is set to -1294967296 instead of 3000000000

Expected results:
Value should be refused if too high.

Additional info:

Comment 2 Nathan Kinder 2013-07-08 21:33:02 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/47427

Comment 3 Ján Rusnačko 2013-07-09 07:08:18 UTC
Additionally, please consider changing the upper bound in returned error message:

ldapmodify -h localhost -p 22139 -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: -2
EOF
modifying entry "cn=config"
ldap_modify: Operations error (1)
	additional info: nsslapd-disk-monitoring-threshold: "-2" is invalid, threshold must be greater than 2048 and less then -1

Comment 7 Ján Rusnačko 2013-07-25 09:39:04 UTC
[jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 19741 -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: -2
EOF
modifying entry "cn=config"

[jrusnack@dstet 6.0]$ ldapsearch -h localhost -p 19741 -D "cn=directory manager" -w Secret123 -b "cn=config" -s base -LLL nsslapd-disk-monitoring-threshold
dn: cn=config
nsslapd-disk-monitoring-threshold: -2

[jrusnack@dstet 6.0]$ rpm -qa | grep 389
389-ds-base-debuginfo-1.2.11.15-18.el6_4.x86_64
389-ds-base-libs-1.2.11.15-18.el6_4.x86_64
389-ds-base-1.2.11.15-18.el6_4.x86_64

Negative values should be refused - see comment #3.

Another unrelated minor issue:

"Available disk space is now acceptable (0 bytes).  Aborting shutdown, and restoring the log settings."

The error message from log, that notifies about abort of shutdown, should probably contain information about free space, instead of '0 bytes'.

Comment 9 Ján Rusnačko 2013-08-27 13:20:25 UTC
Verified on 389-ds-base-1.2.11.15-22.el6.x86_64:

Trying to set nsslapd-disk-monitoring-threshold to -2
ldap_modify: Operations error
ldap_modify: additional info: nsslapd-disk-monitoring-threshold: "-2" is invalid, threshold must be greater than 4096 and less then 9223372036854775807
modifying entry cn=config

tp14: expect=1 actual=1
PASS
Trying to set nsslapd-disk-monitoring-threshold to 9223372036854775808
ldap_modify: Operations error
ldap_modify: additional info: nsslapd-disk-monitoring-threshold: "9223372036854775808" is invalid, threshold must be greater than 4096 and less then 9223372036854775807
modifying entry cn=config

tp14: expect=1 actual=1
PASS
Trying to set nsslapd-disk-monitoring-threshold to 2047
ldap_modify: Operations error
ldap_modify: additional info: nsslapd-disk-monitoring-threshold: "2047" is invalid, threshold must be greater than 4096 and less then 9223372036854775807
modifying entry cn=config

tp14: expect=1 actual=1
PASS
Trying to set nsslapd-disk-monitoring-threshold to 0
ldap_modify: Operations error
ldap_modify: additional info: nsslapd-disk-monitoring-threshold: "0" is invalid, threshold must be greater than 4096 and less then 9223372036854775807
modifying entry cn=config

tp14: expect=1 actual=1
PASS
Trying to set nsslapd-disk-monitoring-threshold to -1 294 967 296
ldap_modify: Operations error
ldap_modify: additional info: nsslapd-disk-monitoring-threshold: "-1294967296" is invalid, threshold must be greater than 4096 and less then 9223372036854775807
modifying entry cn=config

tp14: expect=1 actual=1
PASS
Trying to set nsslapd-disk-monitoring-threshold to "invalid"
ldap_modify: Operations error
ldap_modify: additional info: nsslapd-disk-monitoring-threshold: "invalid" is invalid, threshold must be greater than 4096 and less then 9223372036854775807
modifying entry cn=config

tp14: expect=1 actual=1
PASS
Trying to delete nsslapd-disk-monitoring-threshold
ldap_modify: DSA is unwilling to perform
ldap_modify: additional info: Deleting attributes is not allowed
modifying entry cn=config

tp14: expect=53 actual=53
PASS

Comment 10 Ján Rusnačko 2013-09-11 14:39:03 UTC
Not working on latest 389-ds-base-1.2.11.15-23 :

[jrusnack@dstet ~]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config" -LLL nsslapd-disk-monitoring-threshold -s base
dn: cn=config
nsslapd-disk-monitoring-threshold: 2097152

[jrusnack@dstet ~]$ ldapmodify -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: 3000000000
EOF
modifying entry "cn=config"

[jrusnack@dstet ~]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config" -LLL nsslapd-disk-monitoring-threshold -s base
dn: cn=config
nsslapd-disk-monitoring-threshold: -1294967296

[jrusnack@dstet ~]$ rpm -qa | grep 389-ds-base
389-ds-base-1.2.11.15-23.el6.x86_64
389-ds-base-libs-1.2.11.15-23.el6.x86_64

Comment 11 Ján Rusnačko 2013-09-23 13:16:40 UTC
Verified on 389-ds-base-1.2.11.15-24. All tests in disk monitoring suite are passing.

Comment 12 errata-xmlrpc 2013-11-21 21:10:27 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.

http://rhn.redhat.com/errata/RHBA-2013-1653.html