On 11/29/24 12:12, Eelco Chaudron wrote:
>
>
> On 28 Nov 2024, at 12:48, Ilya Maximets wrote:
>
>> Memory Sanitizer reports use of uninitialized stream/pstream pointers
>> while recording results of open/listen:
>>
>> WARNING: MemorySanitizer: use-of-uninitialized-value
>> 0 0x7c48cf in pstream_open lib/stream.c:567:5
>> 1 0x7c71ed in pstream_open_with_default_port lib/stream.c:772:13
>> 2 0x6c7731 in jsonrpc_pstream_open lib/jsonrpc.c:80:12
>> 3 0x509345 in ovsdb_jsonrpc_server_add_remote ovsdb/jsonrpc-server.c:374:13
>> 4 0x508eed in ovsdb_jsonrpc_server_set_remotes
>> ovsdb/jsonrpc-server.c:355:22
>> 5 0x4dca59 in reconfigure_remotes ovsdb/ovsdb-server.c:1778:5
>> 6 0x4c9d42 in reconfigure_ovsdb_server ovsdb/ovsdb-server.c:686:19
>> 7 0x4c432a in main ovsdb/ovsdb-server.c:788:10
>> 8 0x7fb979 in __libc_start_call_main
>> 9 0x7fb979 in __libc_start_main@GLIBC_2.2.5
>> 10 0x432b64 in _start (ovsdb/ovsdb-server+0x432b64)
>>
>> It complains just about the function call even if the value inside the
>> function is not being used. Can be fixed by initializing the stream
>> pointer to NULL. However, there is a possibility of it being used when
>> we also fail to record the result. We should be using the provided
>> name in the error log instead of trying to access the name through the
>> potentially uninitialized or NULL pointer.
>>
>> While at it, also fixing the log message to be more accurate.
>>
>> Fixes: fae1ae0434cd ("stream: Add record/replay functionality.")
>> Signed-off-by: Ilya Maximets <[email protected]>
>
>
> Change looks good to me. Did not test the actual change (other than github
> actions).
>
> Acked-by: Eelco Chaudron <[email protected]>
>
Thanks, Dumitru and Eelco!
Applied and backported down to 2.17.
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev