[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7995) of-by-one error in schema



leo@yuriev.ru wrote:
> Full_Name: Leonid Yuriev
> Version: 2.4.40
> OS: RHEL7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (31.130.36.33)
>
>
> In some cases (presumably when a database contains more attributes than defined
> in the scheme) a heap error may be detected at stop of slapd.
>
> Below is the result of attempts to find a bug(s) with Valgrind.
> It is enough to corrupt a malloc's heap!

Please provide a test case. Unable to reproduce this on a local database 
with commented out schema. I get:

violino:~/OD/o24/tests> valgrind ../servers/slapd/slapd -Tc -f 
/tmp/testr/slapd.1.conf > /tmp/out
==25499== Memcheck, a memory error detector
==25499== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==25499== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for 
copyright info
==25499== Command: ../servers/slapd/slapd -Tc -f /tmp/testr/slapd.1.conf
==25499==
54871b4f UNKNOWN attributeDescription "HOMEPOSTALADDRESS" inserted.
54871b4f UNKNOWN attributeDescription "DRINK" inserted.
54871b4f UNKNOWN attributeDescription "HOMEPHONE" inserted.
54871b4f UNKNOWN attributeDescription "PAGER" inserted.
==25499==
==25499== HEAP SUMMARY:
==25499==     in use at exit: 2,746 bytes in 78 blocks
==25499==   total heap usage: 10,335 allocs, 10,257 frees, 1,649,999 
bytes allocated
==25499==
==25499== LEAK SUMMARY:
==25499==    definitely lost: 0 bytes in 0 blocks
==25499==    indirectly lost: 0 bytes in 0 blocks
==25499==      possibly lost: 0 bytes in 0 blocks
==25499==    still reachable: 2,746 bytes in 78 blocks
==25499==         suppressed: 0 bytes in 0 blocks
==25499== Rerun with --leak-check=full to see details of leaked memory
==25499==
==25499== For counts of detected and suppressed errors, rerun with: -v
==25499== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)



-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/