The Samba-Bugzilla – Attachment 15166 Details for
Bug 13951
CVE-2019-12436 [SECURITY] paged_searches crash on LDAP and [homes] access
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch proving the bug
0001-s4-tests-paged_search-empty-a-search-mid-flight.patch (text/plain), 2.42 KB, created by
Douglas Bagnall
on 2019-05-17 02:48:15 UTC
(
hide
)
Description:
WIP patch proving the bug
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2019-05-17 02:48:15 UTC
Size:
2.42 KB
patch
obsolete
>From 6c1e2deb680c889a43f20f6c50dd82e2a7329c3d Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Fri, 17 May 2019 14:42:24 +1200 >Subject: [PATCH] s4/tests/paged_search: empty a search mid-flight > >What happens when there is nothing left in the search results because >the searched-for attribute has changed? > > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >--- > source4/dsdb/tests/python/vlv.py | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > >diff --git a/source4/dsdb/tests/python/vlv.py b/source4/dsdb/tests/python/vlv.py >index 29cc1718c78..d501c8b1c8e 100644 >--- a/source4/dsdb/tests/python/vlv.py >+++ b/source4/dsdb/tests/python/vlv.py >@@ -105,6 +105,7 @@ class TestsWithUserOU(samba.tests.TestCase): > 'givenName': "abcdefghijklmnopqrstuvwxyz"[i % 26], > "roomNumber": "%sbc" % (n - i), > "carLicense": "åæ¥ç»", >+ "facsimileTelephoneNumber": name, > "employeeNumber": "%s%sx" % (abs(i * (99 - i)), '\n' * (i & 255)), > "accountExpires": "%s" % (10 ** 9 + 1000000 * i), > "msTSExpireDate4": "19%02d0101010000.0Z" % (i % 100), >@@ -1421,6 +1422,30 @@ class PagedResultsTests(TestsWithUserOU): > > self.assertEqual(results, expected_results) > >+ def test_paged_change_during_search(self): >+ prefix = "delete_all_" >+ expr = "(&(objectClass=user)(cn=%s*))" % (prefix) >+ del_ctrl = "show_deleted:1" >+ num_users = 2 >+ users = [self.create_user(i, num_users, prefix=prefix) >+ for i in range(num_users)] >+ expr = "(&(objectClass=user)(facsimileTelephoneNumber=%s*))" % (prefix) >+ >+ # Get the first page, then change the searched attribute and >+ # try for the second page. >+ first_page_size = 1 >+ results, cookie = self.paged_search(expr, page_size=1) >+ >+ for u in users: >+ self.ldb.modify_ldif("dn: %s\n" >+ "changetype: modify\n" >+ "replace: facsimileTelephoneNumber\n" >+ "facsimileTelephoneNumber: 123" % u['dn']) >+ >+ results, _ = self.paged_search(expr, cookie=cookie, >+ page_size=len(self.users)) >+ print(results) >+ > def assertPagedSearchRaises(self, err_num, expr, cookie, attrs=None, > extra_ctrls=None): > try: >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13951
:
15159
|
15165
|
15166
|
15173
|
15174
|
15175
|
15198
|
15226
|
15227
|
15228
|
15230
|
15231