Bug 44167 - listener doesn't handle "master entry has unexpected length" properly
listener doesn't handle "master entry has unexpected length" properly
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks: 44168
  Show dependency treegraph
 
Reported: 2017-03-30 16:49 CEST by Arvid Requate
Modified: 2019-01-03 07:18 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling
Max CVSS v3 score:
requate: Patch_Available+


Attachments
fallback_to_notifier_id_file_if_master_entry_has_unexpected_length.patch (490 bytes, patch)
2017-03-30 16:49 CEST, Arvid Requate
Details | Diff
fallback_to_notifier_id_file_if_master_entry_has_unexpected_length_ucs41.patch (489 bytes, patch)
2017-03-30 17:03 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2017-03-30 16:49:15 CEST
Created attachment 8708 [details]
fallback_to_notifier_id_file_if_master_entry_has_unexpected_length.patch

The univention-directory-listener listener doesn't handle the error

  cache_get_master_entry: master entry has unexpected length

properly. The attached patch fixes this.
Comment 1 Arvid Requate univentionstaff 2017-03-30 17:03:13 CEST
Created attachment 8709 [details]
fallback_to_notifier_id_file_if_master_entry_has_unexpected_length_ucs41.patch

The previous patch was for UCS 4.2, the attached patch works for UCS 4.1-4.


Info: I saw this message with a cache.bdb backup from an internal server.

23.11.15 22:34:40.273  LISTENER    ( ERROR   ) : master entry has unexpected length

cache_get_master_entry returns 1 in this case, but the caller in main only checks for DB_NOTFOUND which is defined in libdb3-dev: /usr/include/db.h as:

#define DB_NOTFOUND             (-30991)/* Key/data pair not found (EOF). */


As a consequence, the listener then continues with notifier_id = 0.

The same LMDB listener suffers from the same issue, I'll clone the bug.
Comment 2 Stefan Gohmann univentionstaff 2019-01-03 07:18:46 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.