Bug 555

Summary: alignement problem with struct cache_item in pwutil.c
Product: Sudo Reporter: Martin Husemann <martin>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.7.8   
Hardware: Sun   
OS: NetBSD   
Attachments: Patch we use in pkgsrc, tested on sparc and mips

Description Martin Husemann 2012-05-10 05:34:54 MDT
Created attachment 343 [details]
Patch we use in pkgsrc, tested on sparc and mips

On NetBSD, which uses 64bit time_t, and architectures that require strict alignement (and are 32bit) the blob allocation in pwutil.c causes unaligned accesses and makes sudo/visudo dump core.
Comment 1 Todd C. Miller 2012-05-10 15:01:04 MDT
I've made a more invasive fix for sudo 1.8.5.  Can you verify that ftp://ftp.sudo.ws/pub/sudo/beta/sudo-1.8.5rc5.tar.gz works correctly?  A similar diff will appear in the next sudo 1.7.x release.
Comment 2 Martin Husemann 2012-05-10 16:22:51 MDT
This works fine, thanks for the quick fix!
Comment 3 Todd C. Miller 2012-09-12 15:05:36 MDT
Fixed in sudo 1.8.5 and 1.7.10.