Bug 555 - alignement problem with struct cache_item in pwutil.c
alignement problem with struct cache_item in pwutil.c
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.8
Sun NetBSD
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-10 05:34 MDT by Martin Husemann
Modified: 2012-09-12 15:05 MDT (History)
0 users

See Also:


Attachments
Patch we use in pkgsrc, tested on sparc and mips (2.07 KB, patch)
2012-05-10 05:34 MDT, Martin Husemann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.