ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-758

zkpython segfaults on invalid acl with missing key

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.0, 3.4.0
    • Fix Version/s: 3.3.1, 3.4.0
    • Component/s: contrib-bindings
    • Labels:
      None
    • Environment:

      ubuntu lucid (10.04)

    • Hadoop Flags:
      Reviewed

      Description

      Currently when setting an acl, there is a minimal parse to ensure that its a list of dicts, however if one of the dicts is missing a required key, the subsequent usage doesn't check for it, and will segfault.. for example using an acl of [

      {"schema":id, "id":world, permissions:PERM_ALL}

      ] will segfault if used, because the scheme key is missing (its been purposefully typo'd to schema in example).

      I've expanded the check_acl macro to include verifying that all keys are present and added some unit tests against trunk in the attachments.

      1. ZOOKEEPER-758.patch
        2 kB
        Henry Robinson
      2. ZOOKEEPER-758.patch
        2 kB
        Henry Robinson
      3. invalid-acl-fix-and-test.diff
        2 kB
        Kapil Thangavelu

        Activity

        Kapil Thangavelu created issue -
        Kapil Thangavelu made changes -
        Field Original Value New Value
        Attachment invalid-acl-fix-and-test.diff [ 12443153 ]
        Henry Robinson made changes -
        Attachment ZOOKEEPER-758.patch [ 12443299 ]
        Henry Robinson made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags [Reviewed]
        Henry Robinson made changes -
        Attachment ZOOKEEPER-758.patch [ 12443301 ]
        Henry Robinson made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Henry Robinson made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Henry Robinson made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 3.3.1 [ 12314846 ]
        Fix Version/s 3.4.0 [ 12314469 ]
        Resolution Fixed [ 1 ]
        Mahadev konar made changes -
        Assignee Kapil Thangavelu [ kapilt ]
        Mahadev konar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Kapil Thangavelu
            Reporter:
            Kapil Thangavelu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development