Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123704 - app-misc/lirc-0.8.0: buffer overflow in lircd
Summary: app-misc/lirc-0.8.0: buffer overflow in lircd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Matthias Schwarzott
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lirc-tracker
  Show dependency tree
 
Reported: 2006-02-22 04:49 UTC by Martin von Gagern
Modified: 2006-12-01 06:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to lircd.c to avoid buffer overflow (lircd.patch,1002 bytes, patch)
2006-02-22 04:50 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2006-02-22 04:49:15 UTC
Opening many connections to lircd can cause a buffer overflow.

So far I did not think about any explit. For me it just resulted in a segfault.
The problem is that the number of client connections is limited only by the file descriptor numbers, but the reserved buffer space is a little bit less than the maximum allowed file descriptor. The actual overflow happenes when using clin as an array index.

I report this bug upstream at the same time, so I'd expect it to be fixed rather soon, but you never know for sure, and I want Gentoo to be one step ahead.
Comment 1 Martin von Gagern 2006-02-22 04:50:09 UTC
Created attachment 80426 [details, diff]
patch to lircd.c to avoid buffer overflow
Comment 2 Thierry Carrez (RETIRED) gentoo-dev 2006-02-22 10:07:50 UTC
Setting to Auditing for validation
Comment 3 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-04-07 23:22:18 UTC
Auditing any news on this one?
Comment 4 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-06-16 11:10:37 UTC
Auditing any news on this one?
Comment 5 Tavis Ormandy (RETIRED) gentoo-dev 2006-09-29 06:07:24 UTC
It certainly looks like a bug, adding maintainer to help determine impact.

Matthias, the patch looks good, is there any security impact here? If not please consider applying the patch.
Comment 6 Martin von Gagern 2006-09-29 09:06:22 UTC
My patch plus a set of parenthesis around the constant definition has been committed to the upstream CVS on Feb 28 for revision 5.63 of lircd.c.
http://lirc.cvs.sourceforge.net/lirc/lirc/daemons/lircd.c?r1=5.62&r2=5.63

lirc dev Christoph Bartelmus saw no security impact, as the overflow occurs on the heap not the stack, and there is no user input, so an exploit is unlikely.

I guess that my strict access restriction to this bug report here might have caused this slow procedure in addressing the issue. Sorry there.
Comment 7 Tavis Ormandy (RETIRED) gentoo-dev 2006-09-29 09:34:18 UTC
Okay, thanks for the update Martin.

Reassigning to maintainer, who can apply the patch to our package if nescessary.

Comment 8 Matthias Schwarzott gentoo-dev 2006-12-01 06:36:36 UTC
Solved in lirc-0.8.0-r7, thanks for the patch.