[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Full-Disclosure] openssh remote exploit
- To: full-disclosure@xxxxxxxxxxxxxxxx
- Subject: Re: [Full-Disclosure] openssh remote exploit
- From: Adam Dyga <adeon@xxxxxxx>
- Date: Wed, 17 Sep 2003 12:20:45 +0200
There is also one little bug in the code, look below.
|
| void *
| buffer_append_space(Buffer *buffer, u_int len)
| {
| void *p;
|
| if (len > 0x100000)
| fatal("buffer_append_space: len %u not supported", len);
|
| /* If the buffer is empty, start using it from the beginning.
| */
| if (buffer->offset == buffer->end) {
| buffer->offset = 0;
| buffer->end = 0;
| }
| restart:
| /* If there is enough space to store all data, store it now.
| */
| if (buffer->end + len < buffer->alloc) {
[...]
The comparision should be
if (buffer->end + len <= buffer->alloc) {
because buffer->end is not an offset of last byte in buffer, but it's an
offset of first byte _afer_ the last byte in buffer. Anyway, this is not a
security flaw.
--
Greets
adeon
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html