Print

Print


Hi Andy,

During normal EOS operations, we noticed that one storage node crashed in the XrdHttpExtHandler.cc:93 line.
@smithdh (many thanks again!) could reproduce the issue by starting an EOS FST and submitting, via netcat: 

```
nc -Cv localhost 11000
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to ::1:11000.
 GET // HTTP/1.1
```

Notice the first line starting with a space. This space, at the beginning of the first line would prevent the `XrdHttpReq::parseFirstLine()` method to call the `XrdHttpReq::parseResource()` one.

Once the constructor of an `XrdHttpExtReq` is called, the line `headers["xrd-http-fullresource"] = req->resourceplusopaque.c_str();` will segfault as the resource was not parsed. Indeed, the `resourceplusopaque` XrdOucString has not been asigned and its the c_str() method of an will therefore return a NULL pointer.

Hence my two fixes.

Cheers,
Cedric
You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/1798

-- Commit Summary --

  * [XrdHttp + XrdHttpExtHandler] Fixes a segmentation fault happening when a client sends a first line starting with a space

-- File Changes --

    M src/XrdHttp/XrdHttpExtHandler.cc (3)
    M src/XrdHttp/XrdHttpReq.cc (10)

-- Patch Links --

https://github.com/xrootd/xrootd/pull/1798.patch
https://github.com/xrootd/xrootd/pull/1798.diff

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

Message ID: <[log in to unmask]>

########################################################################
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