Valgrind reports "Conditional jump or move depends on uninitialised value(s)"

Bug #425604 reported by Henrik Munktell
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmodbus
Fix Released
High
Stéphane Raimbault

Bug Description

libmodbus 2.2.0, ubuntu 8.04, valgrind-3.3.0-Debian

Running my RTU master app through Valgrind generates those errors on first occurence of rtu slave timeout. Just on the first occurence, not when the slave answers correctly. (Note the different functions, set_single and read_registers)

==8308== Conditional jump or move depends on uninitialised value(s)
==8308== at 0x403906C: modbus_receive (modbus.c:743)
==8308== by 0x40396E3: set_single (modbus.c:1215)
==8308== by 0x805108D: function_modbus (main.c:2270)
==8308== by 0x44944FA: start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
==8308== by 0x4416E5D: clone (in /lib/tls/i686/cmov/libc-2.7.so)

==8308== Conditional jump or move depends on uninitialised value(s)
==8308== at 0x403906C: modbus_receive (modbus.c:743)
==8308== by 0x40397CE: read_registers (modbus.c:1146)
==8308== by 0x80509A9: function_modbus (main.c:2146)
==8308== by 0x44944FA: start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
==8308== by 0x4416E5D: clone (in /lib/tls/i686/cmov/libc-2.7.so)

Looks like some variable is uninitialised the first time there is a timeout from rtu slave.
As this is a memory thing, I mark this bug a security vulnerbility.
/Henrik

Related branches

visibility: private → public
Revision history for this message
Stéphane Raimbault (sra) wrote :

Thank you, Henrik!

Changed in libmodbus:
assignee: nobody → Stéphane Raimbault (sra)
importance: Undecided → High
milestone: none → 2.2.0
status: New → Fix Committed
Changed in libmodbus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.