Description of problem: (from Neil Brown, md maintainer) In most cases we check the size of the bitmap file before reading data from it. However when reading the superblock, we always read the first PAGE_SIZE bytes, which might not always be appropriate. So limit that read to the size of the file if appropriate. Also, we get the count of available bytes wrong in one place, so that too can read past the end of the file. Patch, which is in mainline and has been tested against the RHEL 5 kernel, attached. Version-Release number of selected component (if applicable): kernel: 2.6.18-8.1.1.el5 RHEL: redhat-release-5Server-5.0.0.7 How reproducible: Always Steps to Reproduce: 1. create md array with a bitmap file where bitmap file is on a filesystem with block size smaller than page size -- md will try to read past the end of the file, which causes the md array to fail or 2. create md array with a bitmap file such that the size of the bitmap file is close to the page size (within 256 bytes) -- this also causes md to read past the end of the file, causing the md array to fail
Created attachment 153209 [details] kernel patch
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
in 2.6.18-71.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0314.html