Re: [Fail2ban-users] "Feb 29" bug

Cyril Jaquier wrote:
>> If you are affected by this bug, please apply the attached patch.
>
> Sorry the attached patch won't apply on 0.8.1 :( Here is a better
> one. Many thanks to Yaroslav Halchenko for it.
I have a couple of CentOS 4 machines that still run fail2ban 0.6.2,
because that's what the rpmforge repository provides (CentOS 4 comes
with Python 2.3). Fail2ban 0.6 doesn't have a file called
datestrptime.py. Could you maybe provide a patch for fail2ban 0.6 for
us Python 2.3 users, pretty please? Some machines have already hit
this bug...
Nils Breunese.

Thread view

Hi all,
A few hours ago, James Andrewartha (from Australia) reported that
fail2ban started taking 100% CPU.
This bug is caused by a problem in datetemplate.py. Some date patterns
do not have a year field (like "Feb 29 01:00:00"). If no year is given,
the Python strptime function uses 1900 as default which is... not a leap
year. So the function raises an exception.
If you are affected by this bug, please apply the attached patch.
I will release 0.8.2 as soon as possible. But fail2ban-regex is
currently broken so I need more time to fix it.
Sorry for the inconvenience.
Regards,
Cyril Jaquier

Cyril Jaquier wrote:
>> If you are affected by this bug, please apply the attached patch.
>
> Sorry the attached patch won't apply on 0.8.1 :( Here is a better
> one. Many thanks to Yaroslav Halchenko for it.
I have a couple of CentOS 4 machines that still run fail2ban 0.6.2,
because that's what the rpmforge repository provides (CentOS 4 comes
with Python 2.3). Fail2ban 0.6 doesn't have a file called
datestrptime.py. Could you maybe provide a patch for fail2ban 0.6 for
us Python 2.3 users, pretty please? Some machines have already hit
this bug...
Nils Breunese.

Hi Nils,
> I have a couple of CentOS 4 machines that still run fail2ban 0.6.2,
> because that's what the rpmforge repository provides (CentOS 4 comes
> with Python 2.3). Fail2ban 0.6 doesn't have a file called
> datestrptime.py. Could you maybe provide a patch for fail2ban 0.6 for
> us Python 2.3 users, pretty please? Some machines have already hit
> this bug...
>
I will find a patch for 0.6.2 here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1904430&group_id=121032&atid=689044
I attached it to this e-mail too.
Regards,
Cyril

Cyril Jaquier wrote:
>> I have a couple of CentOS 4 machines that still run fail2ban
>> 0.6.2, because that's what the rpmforge repository provides
>> (CentOS 4 comes with Python 2.3). Fail2ban 0.6 doesn't have a file
>> called datestrptime.py. Could you maybe provide a patch for
>> fail2ban 0.6 for us Python 2.3 users, pretty please? Some machines
>> have already hit this bug...
>
> I will find a patch for 0.6.2 here:
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1904430&group_id=121032&atid=689044
>
> I attached it to this e-mail too.
Thanks a lot. Seems to work fine with the patch.
Nils Breunese.