If you use "rpm --verify" on a package with empty files, rpm will report "?" in the MD5 column for the empty files. This is because mmap files when you try to map a file of length zero. Whether that failure is correct is, I suppose, a matter of some debate; the man page doesn't make it clear, although the specs may be clearer. In any case, the attached patch eliminates the problem.
Created attachment 115085 [details] patch not to try to mmap empty files
This started happening when I upgraded my custom kernel from 2.6.11 to 2.6.12. It's also reproducable with kernel-2.6.11-1.1369_FC4. It appears that this 'breakage' was deliberate, according to the ChangeLog for 2.6.12: commit d11cf326bd5e785cc5a3f5a3d3f4e3a5522f4fb7 Author: Zhang Yanmin <yanmin.zhang> Date: Sun May 22 17:47:00 2005 -0700 [IA64] sys_mmap doesn't follow posix.1 when parameter len=0 In IA64 kernel, sys_mmap calls do_mmap2 and do_mmap2 returns addr if len=0, which means the mmap sys call succeeds. Posix.1 says: The mmap() function shall fail if: [EINVAL] The value of len is zero. Here is a patch to fix it. Signed-off-by: Zhang Yanmin <yanmin.zhang> Acked-by: David Mosberger <davidm.com> Signed-off-by: Tony Luck <tony.luck>
Real bug. Affects security (since some people use rpm --verity regularly to audit their systems, and this bug causes spurious output from rpm --verity). Reported over a month ago. Fix included in bug report. Can we please move this along?
Fixed in rpm-4.4.2-1.
Shouldn't this be backported to RHEL 4 (RPM version 4.3.3) as well?
For consideration for RHEL please file an issue with support. https://www.redhat.com/apps/support/ as described at https://bugzilla.redhat.com/
Well, there you have your answer!
Service request #766776 has been filed to request backporting this patch to RHEL 4.