Bug 14700 - opendir: potential integer overflow
Summary: opendir: potential integer overflow
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.17
Assignee: Florian Weimer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-11 14:37 UTC by Florian Weimer
Modified: 2014-06-25 06:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2012-10-11 14:37:52 UTC
In __alloc_dir in sysdeps/posix/opendir.c, st_blksize can be a large value from a source which is not necessarily trusted.  Therefore, we should check that the addition does not overflow and fall back to default_allocation in that case.
Comment 1 Florian Weimer 2012-11-29 15:14:20 UTC
Fixed in commit 172a631a1fc8ec8fcef80af1f91438d092957c3e.