Opened 5 years ago

Last modified 5 years ago

#4673 new defect

hostname option crashs oscam

Reported by: geohei Owned by:
Priority: major Component: General
Severity: medium Keywords: hostname failban crash
Cc: Sensitive: yes

Description

Tested with r11401 and r11420 (latest).

oscam.conf:
failbancount = 0
failbantime = 60

oscam.user:
hostname = <FQDN>

If during failbantime, the FQDN of a client changes, he will be blocked during that time since DNS server IP propagation takes some time. If prior failban time termination, the FQDN changes again, I get a "oscam <defunct>" task (zombie). It is the second of the 2 shown "oscam" tasks ("ps -e"). This doesn't happen immediately - sometimes only after 30 minutes. But the bug is reproducible!

The webif indication of a crashed task is when the Failban list shows "00:00:00" for the client who changed FQDN.

All this occurs only when failbantime != 0.

Here a simulation:

top - 14:58:18 up 3 days, 18:21,  2 users,  load average: 0.17, 0.23, 0.20
Tasks: 111 total,   1 running, 110 sleeping,   0 stopped,   0 zombie

Client FQDN change.
Client shows up in Failban list.
No zombie yet!

top - 15:04:36 up 3 days, 18:27,  3 users,  load average: 0.08, 0.12, 0.15
Tasks: 114 total,   1 running, 113 sleeping,   0 stopped,   0 zombie

Another client FQDN change.
Client shows up with 2 IPs in Failban list.
Still no zombie!

top - 15:24:20 up 3 days, 18:47,  3 users,  load average: 0.01, 0.04, 0.08
Tasks: 114 total,   1 running, 113 sleeping,   0 stopped,   0 zombie

After 13 minutes ...

top - 15:37:58 up 3 days, 19:00,  3 users,  load average: 1.09, 0.60, 0.28
Tasks: 115 total,   1 running, 113 sleeping,   0 stopped,   1 zombie
> ps -e | grep oscam
   1604 ?        00:00:00 oscam
   1606 ?        04:44:37 oscam <defunct>

Having this knowledge, a client can crash a server!

Change History (2)

comment:1 by geohei, 5 years ago

Keywords: hostname failban crash added

comment:2 by geohei, 5 years ago

Severity: Please fill inmedium
Note: See TracTickets for help on using tickets.