Bug 477607

Summary: mkfontscale produces syscalls with EINVAL
Product: [Fedora] Fedora Reporter: Steve Grubb <sgrubb>
Component: freetypeAssignee: Behdad Esfahbod <behdad>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9CC: behdad, fonts-bugs, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-22 17:47:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch fixing problems described herein none

Description Steve Grubb 2008-12-22 12:02:52 UTC
Created attachment 327635 [details]
patch fixing problems described herein

Description of problem:
The mkfontscale program uses the freetype library. Our IDS work shows that the freetype library causes mmap syscalls with EINVAL return codes. This is because its not checking the length of the file before calling mmap. If the file is opened readonly and the length is 0, the kernel does not like it.


How reproducible:
always

Steps to Reproduce:
1. add to audit rules: -a always,exit -S mmap -F exit=-ENIVAL -k einval
2. reboot system
3. ausearch --start recent -k einval

Comment 1 Behdad Esfahbod 2008-12-22 17:47:53 UTC
Reported upstream:
http://savannah.nongnu.org/bugs/?25151