Bug 27217

Summary: crontab buffer overflows on names over 20 chars
Product: [Retired] Red Hat Linux Reporter: Chris Ricker <chris.ricker>
Component: vixie-cronAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: dr
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-10 21:59:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Chris Ricker 2001-02-12 22:26:01 UTC
Just like the recent post to Bugtraq regarding vixie-cron and RH 7.0.
crontab does getpwuid() but then stores the name in a 20-byte buffer w/o
checking its length.  Since crontab is suid root, this could be fun....

[thisnameislongandbreakscrontab@station12 thisnameislongandbreakscrontab]$
Segmentation fault
[thisnameislongandbreakscrontab@station12 thisnameislongandbreakscrontab]$
rpm -qf `which crontab`
[thisnameislongandbreakscrontab@station12 thisnameislongandbreakscrontab]$

Comment 1 Bill Nottingham 2001-02-12 22:29:35 UTC
*** Bug 27216 has been marked as a duplicate of this bug. ***

Comment 2 Bill Nottingham 2001-02-12 22:30:05 UTC
Fixed in -61.

Comment 3 Glen Foster 2001-02-12 22:59:33 UTC
This defect is considered MUST-FIX for Florence Release-Candidate #1

Comment 4 Daniel Roesen 2001-02-14 15:43:07 UTC
Does this bug also affect RH 6.x?

Comment 5 Bill Nottingham 2001-02-14 17:09:14 UTC
Sort of. It overflows the buffer, but manages not to crash.

Comment 6 Daniel Roesen 2001-02-14 17:19:51 UTC
Hm, but I guess there will be a security errata release for all releases?

Comment 7 Chris Ricker 2001-02-14 17:27:44 UTC
I'm not sure there's a need to.  Sure, buffer overflows, esp. in suid programs
are never good, but how could you exploit this particular one?

Comment 8 Daniel Roesen 2001-02-14 17:29:17 UTC
I don't know, but better safe than sorry. IMNSHO.