[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#778375: apt-transport-https: segfaults



On 15/02/15 23:16, Tomasz Buchert wrote:
> [...]
>
> Okay, I get a segfault too now:
> [  153.995036] https[2667]: segfault at 69 ip 00007f41539d7b03 sp 00007fffa171dbb0 error 4 in https[7f41539cc000+12000]
>
> Tomasz
>

Hi again,
I've recompiled apt-transport-https with debugging symbols and
derandomized positions of code sections (via echo 0 | sudo tee
/proc/sys/kernel/randomize_va_space).  I got this:

[  510.536222] https[2990]: segfault at 69 ip 000055555555fb03 sp 00007fffffffdbf0 error 4 in https[555555554000+12000]

and then, via gdb:

(gdb) list *0x000055555555fb03
0x55555555fb03 is in ServerState::HeaderLine(std::string) (/tmp/apt-1.0.9.6/methods/server.cc:120).
115	   // Parse off any trailing spaces between the : and the next word.
116	   string::size_type Pos2 = Pos;
117	   while (Pos2 < Line.length() && isspace(Line[Pos2]) != 0)
118	      Pos2++;
119
120	   string Tag = string(Line,0,Pos);
121	   string Val = string(Line,Pos2);
122
123	   if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0)
124	   {

So there is an issue with parsing of HTTP headers or something like
that around server.cc:120.  Unfortunately, I don't have much time to
dig more at the moment. Hope this helps.

Tomasz


Reply to: