| Summary: | md5 salt documented as being 16 bytes max length. In reailty it is 8 bytes max length. | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | Andre Yelistratov <andre> |
| Component: | Books & Articles | Assignee: | Tom Rhodes <trhodes> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->patched I reviewed crypt-md5.c and read the manual page, this has been patched, thanks! Responsible Changed From-To: freebsd-doc->trhodes I have reviewed the manual page, and patched crypt(3). Thanks! State Changed From-To: patched->closed Fixed in STABLE, thanks for pointing this out! |
The maximum length of salt in MD5 is hardoded at crypt-md5.c and represents 8 bytes, contrary to 'man 3 crypt': 'The length of the salt is limited to 16 characters'. crypt-md5.c: /* Refine the Salt first */ sp = salt; [skip] /* It stops at the first '$', max 8 chars */ for(ep=sp;*ep && *ep != '$' && ep < (sp+8);ep++) continue; Fix: Trivial. How-To-Repeat: call md5 crypt() with any salt longer than 8 chars.