Whenever you create a file on an jfs filesystem, some amount of other in-memory data, _not_ the file's contents and _not_ something which is present in the same filesystem or which previously was in a file at all, gets written to the device holding the filesystem. Could be a security issue if you have stuff in memory like crypto keys and don't expect them to get stuck on disk (well unless swapped) Issue is a fairly minor severity Similar to CAN-2004-0133, reported by Solar Designer of OpenWall on Feb28. Embargo lifted April 14th 2004 (note does not affect RHEL2.1 ia32)
Created attachment 99508 [details] jfs patch for 2.4
This patch matches what's in 2.6, but I'm not convinced it is correct. In particular, the rest of the function __get_metapage() seems to use the "size" argument for the logical block size; yet the memset added at the end uses an unconditional "PSIZE" (always 4096 bytes) as the size. It's not at all clear to me which is correct, especially for architectures that have pagesize other than 4096 bytes. Dave, can you confirm that this is intended? Other than that, this patch looks OK. I haven't done *any* testing on it, but it matches what's upstream so I assume it's sane enough at least on common platforms.
The fix is correct, and is the same patch as was submitted to the mainline kernel: http://linux.bkbits.net:8080/linux-2.4/cset@40575a9epBHk-c8KEyc5eYwpXn6Cgg In __get_metapage, size will always be equal to PSIZE. JFS on linux has always supported only 4K blocks. Also, jfs in the 2.4 kernel is completely broken on architectures with a page size greater than 4K. This was recently fixed in the 2.6 kernel, but the changes were too pervasive to port back to 2.4. The patch is good.
Thanks!
A fix for this problem has just been committed to the RHEL3 U6 patch pool this evening (in kernel version 2.4.21-32.6.EL).
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/RHSA-2005-663.html