[PATCH] Do not use un-initialised variables in audit_logging

Gary Lockyer gary at catalyst.net.nz
Mon Jun 25 18:57:15 UTC 2018


Look good to me RB+.

Note to self write unit tests before refactoring code :-)

Thanks
Gary.

On 25/06/18 15:09, Andrew Bartlett via samba-technical wrote:
> G'Day Gary,
> 
> I was chasing an unrelated issue with valgrind and noticed use of an 
> uninitialised value here:
> 
> lib/audit_logging/audit_logging.c: audit_message_send()
> 
> struct server_id event_server
> 
> 
> ==9198== Conditional jump or move depends on uninitialised value(s)
> ==9198==    at 0xD62CE58: imessaging_send (messaging_send.c:68)
> ==9198==    by 0xBAC3D6F: audit_message_send (audit_logging.c:262)
> ==9198==    by 0xBAC243D: log_json (auth_log.c:87)
> ==9198==    by 0xBAC27B5: log_authentication_event_json
> (auth_log.c:200)
> ==9198==    by 0xBAC318B: log_authentication_event (auth_log.c:520)
> ==9198==    by 0x1BC9AA30: hdb_samba4_auth_status (hdb-samba4.c:496)
> ==9198==    by 0x1BA6E076: _kdc_as_rep (kerberos5.c:1390)
> ==9198==    by 0x1BA7B131: kdc_as_req (process.c:70)
> ==9198==    by 0x1BA7B397: krb5_kdc_process_krb5_request
> (process.c:242)
> ==9198==    by 0x1B85AE27: kdc_process (kdc-heimdal.c:84)
> ==9198==    by 0x1B85440C: kdc_udp_call_loop (kdc-server.c:137)
> ==9198==    by 0x69AAFAF: _tevent_req_notify_callback
> (tevent_req.c:125)
> ==9198== 
> 
> The attached patches fix up what looks like a bad migration from the
> auth code to the common logging code.  We don't want to ignore the
> NO_SUCH_OBJECT errors.
> 
> CI: https://gitlab.com/catalyst-samba/samba/pipelines/24472905
> 
> Please review and push if CI indicates!
> 
> Thanks,
> 
> Andrew Bartlett
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180626/5076cb25/signature.sig>


More information about the samba-technical mailing list