Re: [SECURITY] DoS attack on backend possible (was: Re:

Поиск
Список
Период
Сортировка
От ngpg@grymmjack.com
Тема Re: [SECURITY] DoS attack on backend possible (was: Re:
Дата
Msg-id Xns92689613B30159wn7t0983uom3iu23n@64.49.215.80
обсуждение исходный текст
Ответ на Re: [SECURITY] DoS attack on backend possible (was: Re:  (Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>)
Ответы Re: [SECURITY] DoS attack on backend possible (was: Re:
Список pgsql-hackers
Weimer@CERT.Uni-Stuttgart.DE (Florian Weimer) wrote in 
news:8765yg2niw.fsf@CERT.Uni-Stuttgart.DE:

> Gavin Sherry <swm@linuxworld.com.au> writes:
> 
>>> Yes, but if you just check that the date given by the user matches the
>>> regular expression "[0-9]+-[0-9]+-[0-9]+", it's still possible to
>>> crash the backend.
> 
>> Anyone who is using that regular expression in an attempt to validate a
>> user supplied date is already in trouble.
> 
> I don't understand why extremely strict syntax checks are necessary.
> The database has to parse it again anyway, and if you can't rely on
> the database to get this simple parsing right, will it store your
> data?  Such a reasoning doesn't seem to be too far-fetched to me

I believe this is often referred to as the layered onion approach of 
security, besides that what constitutes extremely strict syntax checking is 
somewhat subjective.  What about checking the input for backslash, quote, 
and double quote (\'")?  If you are not taking care of those in input then 
crashing the backend is going to be the least of your worries.  I think 
there needs to be some level of checking before the input is blindly passed 
to the backend for parsing.  Typically the input for an individual field 
wouldnt be more than ~255 characters, unless you are dealing with TEXT or 
lo's.  I dont consider adding a length check to the usual \'" check to be 
extreme... but perhaps just as necssary?



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: OOP real life example (was Re: Why is MySQL more
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: libpqxx