Your message dated Sun, 11 Jul 2010 00:52:20 +0200
with message-id <[email protected]>
and subject line Re: possible little DOS risk through file
has caused the Debian Bug report #571038,
regarding possible little DOS risk through file
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
571038: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571038
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: file
Version: 4.26-1
Severity: important

Analyzing a file with lots of end of lines (0x0A) lets file consume minutes of 
CPU time.
Time consumption depends on CPU. 

Debian 4.0 with file version file-4.17 is not affected.

example data for Intel Q6600 @2.4GHz:

round:end of lines:time in seconds
1:1:0.00
2:2:0.00
3:4:0.00
4:8:0.00
5:16:0.00
6:32:0.00
7:64:0.00
8:128:0.00
9:256:0.00
10:512:0.01
11:1024:0.04
12:2048:0.15
13:4096:0.46
14:8192:2.66
15:16384:7.52
16:32768:32.25
17:65536:119.45
18:131072:283.54
19:262144:288.40
20:524288:306.23
21:1048576:269.62
22:2097152:283.24
23:4194304:275.79
24:8388608:305.63
25:16777216:268.72
26:33554432:272.70
27:67108864:273.82
28:134217728:284.44
29:268435456:307.46
30:536870912:280.62

test script needs up to 512MB free space in /tmp!

#!/bin/sh

echo "">/tmp/file.test;
for j in `seq 1 30`; do
    COUNT=`wc -l < /tmp/file.test`
    echo -n "$j:$COUNT:"
    RUNTIME="$(/usr/bin/time -f '%U' file /tmp/file.test| sed -e '/.*/d' 2>&1)"
    echo -n $RUNTIME
    cat /tmp/file.test /tmp/file.test >> /tmp/file.test.1;
    mv /tmp/file.test.1 /tmp/file.test
done


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-bpo.2-686 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages file depends on:
ii  libc6                  2.7-18lenny2      GNU C Library: Shared libraries
ii  libmagic1              4.26-1            File type determination library us
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

file recommends no packages.

file suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 5.04-1

this appears to have been fixed to the amount, that it stops increasing
after the 18th. for me, this is good enough, and i'll close the bug.

---snip---
(sid_i386)u...@server4:~$ sh foo
1:1:0.00
2:2:0.00
3:4:0.00
4:8:0.00
5:16:0.00
6:32:0.00
7:64:0.00
8:128:0.00
9:256:0.00
10:512:0.00
11:1024:0.00
12:2048:0.02
13:4096:0.07
14:8192:0.21
15:16384:0.72
16:32768:2.89
17:65536:11.61
18:131072:28.61
19:262144:26.88
20:524288:26.61
21:1048576:27.40
22:2097152:27.33
23:4194304:27.43
24:8388608:27.94
25:16777216:27.36
26:33554432:27.45
27:67108864:26.54
28:134217728:28.51
29:268435456:26.48
30:536870912:26.26
(sid_i386)u...@server4:~$
---snap---

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          [email protected]
Internet:       http://people.panthera-systems.net/~daniel-baumann/


--- End Message ---

Reply via email to