Bug 167127 - cal writes across stack boundary
Summary: cal writes across stack boundary
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 4
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-30 17:18 UTC by Jerry James
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-10-03 12:54:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2005-08-30 17:18:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

Description of problem:
When libsafe from Fedora Extras is installed, any attempt at using cal from the util-linux package results in output like this:

$ cal 2005
Libsafe version 2.0.16c
Detected an attempt to write across stack boundary.
Terminating /usr/bin/cal.
    uid=500  euid=500  pid=23879
Call stack:
    0x7a6a83    /lib/libsafe.so.2.0.16c
    0x7a71c5    /lib/libsafe.so.2.0.16c
    0x8049f3b   /usr/bin/cal
    0x804a1f2   /usr/bin/cal
    0x198d5a    /lib/libc-2.3.5.so
Overflow caused by wcscat()
Killed

Without libsafe installed, cal runs without complaint under both valgrind and Electric Fence.

Version-Release number of selected component (if applicable):
util-linux-2.12p-9.7

How reproducible:
Always

Steps to Reproduce:
1. Install libsafe from Fedora Extras
2. Run cal with any arguments
3.
  

Actual Results:  A libsafe error is produced and cal is shut down without producing output.

Expected Results:  Cal should have produced its requested output.

Additional info:

Comment 1 Karel Zak 2005-10-03 12:54:14 UTC
I haven't found anything wrong in the code. We use FORTIFY_SOURCE and
-fstack-protector -- it makes libsafe obsolete.


Note You need to log in before you can comment on or make changes to this bug.