exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

newsfetch-20050119.txt

newsfetch-20050119.txt
Posted Feb 2, 2005
Authored by Niels Heinen

The newsfetch package version 1.21 uses several insecure sscanf calls to read data out of a 501 byte buffer into a 100 byte buffer.

tags | advisory
SHA-256 | ce9615a1e335410069ba0ff6c7fd2586de29efc5340197e25eccbbcd305d9df9

newsfetch-20050119.txt

Change Mirror Download
Bug description:
----------------

The newsfetch package version 1.21 and (unofficial JRF's) 1.4 uses
several insecure sscanf calls to read data out of a 501 byte buffer
into a 100 byte buffer. These sscanf functions can be abused by
malicious NNTP servers when sending large strings as a reply to a
LIST request ( -l option ).

Theoretically this issue can cause a security risk. However, I
haven't been able to find an exploitable condition. Still it would
be a good idea to patch this ;p

Also note that the lack of sscanf result checking can easily
cause newsfetch to crash when an uninitialized pointer is being
used. For example, if the server banner doesn't start with a number
(200) then newsfetch will crash immediately.

Fix for the overflow:
---------------------

niels@woof$ diff -u nntp.c.orig nntp.c
--- nntp.c.orig Thu Jul 23 12:03:11 1998
+++ nntp.c Wed Jan 19 11:10:22 2005
@@ -140,7 +140,8 @@
else
fprintf(rctmpfp,"%s",command_buf);
}
- items_read=sscanf(command_buf,"%s %d %d", group, &first_article, &max_article);
+ items_read=sscanf(command_buf,"%99s %d %d", group, &first_article, &max_article);
+ group[sizeof(group)-1] = '\0';
if(items_read < 2)
return(0);
return(items_read);
@@ -334,12 +335,14 @@
if(!get_error2(command_buf))
exit(1);
readNNTPdata();
- sscanf(command_buf,"%s",groupname);
+ sscanf(command_buf,"%99s",groupname);
+ groupname[sizeof(groupname)-1] = '\0';
while(command_buf[0] != '.' || command_buf[1] != 13 )/*|| command_buf[1] != 10)*/
{
fprintf(stderr,"%s\n",groupname);
readNNTPdata();
- sscanf(command_buf,"%s",groupname);
+ sscanf(command_buf,"%99s",groupname);
+ groupname[sizeof(groupname)-1] = '\0';
}
exit(1);

Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    17 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close