Project

General

Profile

Bug #2739

mod_accesslog crashes in v1.4.40 for specified format %T

Added by HenrikHolst almost 3 years ago. Updated almost 3 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
Category:
mod_accesslog
Target version:
Start date:
2016-07-20
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

Hi,

when using this:

accesslog.format = "%h V %u %t \"%r\" %>s %b \"{Referer}i\" \"%{User-Agent}i\" %T"

The mod_accesslog.so from the new v1.4.40 segfaults with:

[16944.995014] lighttpd7239: segfault at 0 ip 00007fdfbfc8ac8e sp 00007ffd0a6cead0 error 4 in mod_accesslog.so[7fdfbfc89000+5000]

It does however work just fine in v1.4.39. I have not yet put an effort into debugging why but will attempt to do that shortly.

mod_accesslog.c.diff (1.43 KB) mod_accesslog.c.diff HenrikHolst, 2016-07-20 13:47

History

#1

Updated by HenrikHolst almost 3 years ago

Found the problem. There was a null pointer reference on f->string->ptr before checking if the string was empty. Attached patch fixes this.

#2

Updated by gstrauss almost 3 years ago

  • Subject changed from mod_accesslog crashes in v1.4.40 for specified format to mod_accesslog crashes in v1.4.40 for specified format %T
  • Category set to mod_accesslog
  • Status changed from New to Fixed
  • Priority changed from Normal to High
  • Target version changed from 1.4.x to 1.4.41

Sorry about that. I hadn't realized it was a segfault. Fixed a few days ago in master in 9c49dc9a

Thanks for the report and for the patch!

#3

Updated by gstrauss almost 3 years ago

FYI: a workaround is to specify %{s}T instead of %T

This will be fixed in lighttpd 1.4.41

Also available in: Atom