Print

Print


A simple valgrind of the HTTP implementation revealed the following:
```
==3545467== Thread 5:
==3545467== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==3545467==    at 0x559FA63: ??? (syscall-template.S:81)
==3545467==    by 0x514C2A6: XrdNetMsg::Send(char const*, int, char const*, int) (XrdNetMsg.cc:89)
==3545467==    by 0x4E7870D: XrdXrootdMonitor::Send(int, void*, int) (XrdXrootdMonitor.cc:1058)
==3545467==    by 0x4E78ABC: XrdXrootdMonitor::Flush() (XrdXrootdMonitor.cc:953)
==3545467==    by 0x4E78B1E: XrdXrootdMonitor::~XrdXrootdMonitor() (XrdXrootdMonitor.cc:300)
==3545467==    by 0x4E78B59: XrdXrootdMonitor::unAlloc(XrdXrootdMonitor*) (XrdXrootdMonitor.cc:865)
==3545467==    by 0x4E7CAFF: Clear (XrdXrootdMonitor.hh:145)
==3545467==    by 0x4E7CAFF: XrdXrootdProtocol::Recycle(XrdLink*, int, char const*) (XrdXrootdProtocol.cc:646)
==3545467==    by 0x4E7E95A: XrdXrootdTransit::Recycle(XrdLink*, int, char const*) (XrdXrootdTransit.cc:472)
==3545467==    by 0x5161346: XrdLink::Close(int) (XrdLink.cc:370)
==3545467==    by 0x51649AE: XrdScheduler::Run() (XrdScheduler.cc:357)
==3545467==    by 0x5164AF8: XrdStartWorking(void*) (XrdScheduler.cc:87)
==3545467==    by 0x51273F6: XrdSysThread_Xeq (XrdSysPthread.cc:86)
==3545467==  Address 0xf0fb01c is 28 bytes inside a block of size 2,040 alloc'd
==3545467==    at 0x4C29E2D: memalign (vg_replace_malloc.c:858)
==3545467==    by 0x4E77F1F: XrdXrootdMonitor::XrdXrootdMonitor() (XrdXrootdMonitor.cc:286)
==3545467==    by 0x4E79894: XrdXrootdMonitor::Alloc(int) (XrdXrootdMonitor.cc:337)
==3545467==    by 0x4E79A68: XrdXrootdMonitor::User::Register(char const*, char const*, char const*) (XrdXrootdMonitor.cc:263)
==3545467==    by 0x4E7F06C: XrdXrootdTransit::Init(XrdXrootd::Bridge::Result*, XrdLink*, XrdSecEntity*, char const*, char const*) (XrdXrootdTransit.cc:296)
==3545467==    by 0x4E7F1A3: XrdXrootdTransit::Alloc(XrdXrootd::Bridge::Result*, XrdLink*, XrdSecEntity*, char const*, char const*) (XrdXrootdTransit.cc:87)
==3545467==    by 0x75DD578: XrdHttpProtocol::Process(XrdLink*) (in /usr/lib64/libXrdHttp-4.so)
==3545467==    by 0x516159C: XrdLink::DoIt() (XrdLink.cc:426)
==3545467==    by 0x51649AE: XrdScheduler::Run() (XrdScheduler.cc:357)
==3545467==    by 0x5164AF8: XrdStartWorking(void*) (XrdScheduler.cc:87)
==3545467==    by 0x51273F6: XrdSysThread_Xeq (XrdSysPthread.cc:86)
==3545467==    by 0x5598DC4: start_thread (pthread_create.c:308)
==3545467== 
```

This always appears to occur when the first transfer is done after the server is started up.  Looks like it might just be due to the monitoring code.

Sending uninitialized data over the network is dangerous as it may leak server state (such as random pieces of the server key; c.f. OpenSSL Heartbleed).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/492

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1