First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 114038
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Thierry Carrez (RETIRED) <koon@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
centericq.diff patch for overflow patch Tavis Ormandy (RETIRED) 2005-12-13 10:36 0000 522 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 114038 depends on: Show dependency tree
Bug 114038 blocks: 100519 113683

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-11-30 08:22 0000
============
ZRCSA-200503 - ktools Buffer Overflow Vulnerability
	 
11/27/2005
 
Zone-H Research Center Security Advisory 200503
http://www.zone-h.fr

Date of release: 27/11/2005
Software: ktools (http://konst.org.ua/ktools)
Affected versions: <= 0.3
Risk: Medium
Discovered by: Mehdi Oudad "deepfear" and Kevin Fernandez "Siegfried" from the
Zone-H Research Team

Background (from http://konst.org.ua/ktools)
----------
ktools is a library which I wrote for my own programming needs, though its main
purpose is to provide various text-mode user interface controls without a need
to write too much code.

Details
--------
There is a buffer overflow in kkstrtext.h :

#define VGETSTRING(c, fmt)
{
va_list vgs__ap; char vgs__buf[1024];
va_start(vgs__ap, fmt);
vsprintf(vgs__buf, fmt, vgs__ap); c = vgs__buf;
va_end(vgs__ap);
}

This library is used in the following softwares:
centericq
orpheus
motor
groan

(see http://konst.org.ua/en/konstware)

It can be exploited for example in centericq when editing a contact's details
with a detail field longer than 1024 chars (a <description> field of a rss feed
for example).

Details:

- centericq.cc :

case ACT_EDITUSER:
c->save();
/***************** here************/
if(face.updatedetails(c, c->getdesc().pname)) {
if(c->getdesc().pname == infocard)
c->setdispnick(c->getnick());

...
...

- icqdialogs.cc :

bool icqface::updatedetails(icqcontact *c, protocolname upname) {

...
...
while(!finished) {;
gendetails(db.gettree(), c);
...
...


gendetails()
..
if((capab.count(hookcapab::flexiblereg) && ri.params.empty()) ||
!capab.count(hookcapab::flexiblereg)) {
i = tree->addnode(_(" About "));

tree->addleaff(i, 0, 39, " %s ", about.c_str());

- treeview.cc :

int treeview::addleaff(int parent, int color, int ref, const char *fmt, ...) {
string buf;
VGETSTRING(buf, fmt);
return addleaf(parent, color, (void *) ref, buf);
}

- kkstrtext.h :

#define VGETSTRING(c, fmt)
{
va_list vgs__ap; char vgs__buf[1024];
va_start(vgs__ap, fmt);
vsprintf(vgs__buf, fmt, vgs__ap); c = vgs__buf;
va_end(vgs__ap);
}


Solution
---------
None. Vendor contacted on 18/11 and 25/11, no answer.
 
http://www.zone-h.org/en/advisories/read/id=8480/ 
(Some rights reserved, http://creativecommons.org/licenses/by-nc-nd/2.0/)
===============

This needs to be patched.

------- Comment #1 From Thierry Carrez (RETIRED) 2005-12-09 06:51:54 0000 -------
Could someone design a patch (auditors ?)

------- Comment #2 From Tavis Ormandy (RETIRED) 2005-12-13 10:36:55 0000 -------
Created an attachment (id=74654) [details]
patch for overflow

This doesnt look like legal c, isnt he setting c to point to an automatic array
no longer in scope?

Anyway, here's a fix.

------- Comment #3 From Thierry Carrez (RETIRED) 2005-12-14 04:20:46 0000 -------
Wolfram: please test and bump with provided patch

------- Comment #4 From Wolfram Schlich 2005-12-16 00:56:06 0000 -------
Compiled fine on my x86 box, committed =net-im/centericq-4.21.0-r2 archmasked.

------- Comment #5 From Thierry Carrez (RETIRED) 2005-12-16 04:38:55 0000 -------
Thx for the bump, arches please test and mark -r2 stable.

------- Comment #6 From Gustavo Zacarias (RETIRED) 2005-12-16 06:01:24 0000 -------
sparc stable.

------- Comment #7 From Michael Hanselmann (hansmi) (RETIRED) 2005-12-16 11:55:36 0000 -------
Stable on ppc.

------- Comment #8 From Mark Loeser 2005-12-16 21:37:17 0000 -------
x86 done

------- Comment #9 From Simon Stelling (RETIRED) 2005-12-17 02:11:05 0000 -------
amd64 done

------- Comment #10 From Thierry Carrez (RETIRED) 2005-12-20 03:09:27 0000 -------
GLSA 200512-11

First Last Prev Next    No search results available      Search page      Enter new bug