[PATCH] Messaging improvements and fixes needed for auth logging

Volker Lendecke vl at samba.org
Mon Mar 20 10:06:26 UTC 2017


On Mon, Mar 20, 2017 at 08:21:13PM +1300, Andrew Bartlett via samba-technical wrote:
> From eef04949817bab65aa3c3268cf8690e7753e174e Mon Sep 17 00:00:00 2001
> From: Andrew Bartlett <abartlet at samba.org>
> Date: Tue, 14 Mar 2017 15:22:01 +1300
> Subject: [PATCH 4/7] lib/util: Do not return an unterminated pointer in
>  tdb_fetch_talloc()
> 
> Otherwise, if a TDB entry is truncated to 0 length, this will return
> uninitialised memory!

Can you explain a bit more what is going on here? I would like to
avoid DATA_BLOB and/or TDB_DATA where it makes sense. Here we always
return a talloc'ed object that carries its own length. I think that a
talloc objects is just as expressive as a DATA_BLOB, you can always
query its length with talloc_get_size.

I would like to understand the bug that this fixes that is not fixable
with keeping just the uint8_t* return from tdb_fetch_talloc().

Thanks,

Volker



More information about the samba-technical mailing list