<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/xfs, branch linux-3.15.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.15.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.15.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2014-08-14T01:51:50+00:00</updated>
<entry>
<title>xfs: log vector rounding leaks log space</title>
<updated>2014-08-14T01:51:50+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-19T22:18:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a034676d36c901a70a3a99a4bde7bf3d7e17d6a7'/>
<id>urn:sha1:a034676d36c901a70a3a99a4bde7bf3d7e17d6a7</id>
<content type='text'>
commit 110dc24ad2ae4e9b94b08632fe1eb2fcdff83045 upstream.

The addition of direct formatting of log items into the CIL
linear buffer added alignment restrictions that the start of each
vector needed to be 64 bit aligned. Hence padding was added in
xlog_finish_iovec() to round up the vector length to ensure the next
vector started with the correct alignment.

This adds a small number of bytes to the size of
the linear buffer that is otherwise unused. The issue is that we
then use the linear buffer size to determine the log space used by
the log item, and this includes the unused space. Hence when we
account for space used by the log item, it's more than is actually
written into the iclogs, and hence we slowly leak this space.

This results on log hangs when reserving space, with threads getting
stuck with these stack traces:

Call Trace:
[&lt;ffffffff81d15989&gt;] schedule+0x29/0x70
[&lt;ffffffff8150d3a2&gt;] xlog_grant_head_wait+0xa2/0x1a0
[&lt;ffffffff8150d55d&gt;] xlog_grant_head_check+0xbd/0x140
[&lt;ffffffff8150ee33&gt;] xfs_log_reserve+0x103/0x220
[&lt;ffffffff814b7f05&gt;] xfs_trans_reserve+0x2f5/0x310
.....

The 4 bytes is significant. Brain Foster did all the hard work in
tracking down a reproducable leak to inode chunk allocation (it went
away with the ikeep mount option). His rough numbers were that
creating 50,000 inodes leaked 11 log blocks. This turns out to be
roughly 800 inode chunks or 1600 inode cluster buffers. That
works out at roughly 4 bytes per cluster buffer logged, and at that
I started looking for a 4 byte leak in the buffer logging code.

What I found was that a struct xfs_buf_log_format structure for an
inode cluster buffer is 28 bytes in length. This gets rounded up to
32 bytes, but the vector length remains 28 bytes. Hence the CIL
ticket reservation is decremented by 32 bytes (via lv-&gt;lv_buf_len)
for that vector rather than 28 bytes which are written into the log.

The fix for this problem is to separately track the bytes used by
the log vectors in the item and use that instead of the buffer
length when accounting for the log space that will be used by the
formatted log item.

Again, thanks to Brian Foster for doing all the hard work and long
hours to isolate this leak and make finding the bug relatively
simple.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Brian Foster &lt;bfoster@redhat.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: Bill &lt;billstuff2001@sbcglobal.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xfs: xfs_readsb needs to check for magic numbers</title>
<updated>2014-07-07T01:59:11+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-06-06T06:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=008643fecc2f65accbaccc2f1b97cc56cb5bd42a'/>
<id>urn:sha1:008643fecc2f65accbaccc2f1b97cc56cb5bd42a</id>
<content type='text'>
commit 556b8883cfac3d3203557e161ea8005f8b5479b2 upstream.

Commit daba542 ("xfs: skip verification on initial "guess"
superblock read") dropped the use of a verifier for the initial
superblock read so we can probe the sector size of the filesystem
stored in the superblock. It, however, now fails to validate that
what was read initially is actually an XFS superblock and hence will
fail the sector size check and return ENOSYS.

This causes probe-based mounts to fail because it expects XFS to
return EINVAL when it doesn't recognise the superblock format.

Reported-by: Plamen Petrov &lt;plamen.sisi@gmail.com&gt;
Tested-by: Plamen Petrov &lt;plamen.sisi@gmail.com&gt;
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fs,userns: Change inode_capable to capable_wrt_inode_uidgid</title>
<updated>2014-06-16T20:44:09+00:00</updated>
<author>
<name>Andy Lutomirski</name>
<email>luto@amacapital.net</email>
</author>
<published>2014-06-10T19:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d3c8656bc29be81894dc78a300c37b84d281ec03'/>
<id>urn:sha1:d3c8656bc29be81894dc78a300c37b84d281ec03</id>
<content type='text'>
commit 23adbe12ef7d3d4195e80800ab36b37bee28cd03 upstream.

The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces.  For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.

This patch changes inode_capable to check for uid and gid mappings and
renames it to capable_wrt_inode_uidgid, which should make it more
obvious what it does.

Fixes CVE-2014-4014.

Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Serge Hallyn &lt;serge.hallyn@ubuntu.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Signed-off-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xfs: list_lru_init returns a negative error</title>
<updated>2014-05-14T23:23:24+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:23:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ee4eec478be4677b93775d17bc079efb5922b276'/>
<id>urn:sha1:ee4eec478be4677b93775d17bc079efb5922b276</id>
<content type='text'>
And we don't invert it properly when initialising the dquot lru
list.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
<entry>
<title>xfs: negate xfs_icsb_init_counters error value </title>
<updated>2014-05-14T23:23:07+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bc147822d5ada188fff792691efffe89589e2e19'/>
<id>urn:sha1:bc147822d5ada188fff792691efffe89589e2e19</id>
<content type='text'>
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
<entry>
<title>xfs: negate mount workqueue init error value</title>
<updated>2014-05-14T23:22:53+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=45687642e43d5a3b700d6c1df0e07b3976c90c08'/>
<id>urn:sha1:45687642e43d5a3b700d6c1df0e07b3976c90c08</id>
<content type='text'>
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
<entry>
<title>xfs: fix wrong err sign on xfs_set_acl()</title>
<updated>2014-05-14T23:22:37+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6670232b48848e5ad949dbd4866850aec7035f32'/>
<id>urn:sha1:6670232b48848e5ad949dbd4866850aec7035f32</id>
<content type='text'>
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
<entry>
<title>xfs: fix wrong errno from xfs_initxattrs</title>
<updated>2014-05-14T23:22:21+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5a14de22e8afd771775c7106b3b081c23bac783'/>
<id>urn:sha1:a5a14de22e8afd771775c7106b3b081c23bac783</id>
<content type='text'>
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
<entry>
<title>xfs: correct error sign on COLLAPSE_RANGE errors</title>
<updated>2014-05-14T23:22:07+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=65149e3fab7f053396d09a429085f3071fa50825'/>
<id>urn:sha1:65149e3fab7f053396d09a429085f3071fa50825</id>
<content type='text'>
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
<entry>
<title>xfs: xfs_commit_metadata returns wrong errno</title>
<updated>2014-05-14T23:21:52+00:00</updated>
<author>
<name>Dave Chinner</name>
<email>dchinner@redhat.com</email>
</author>
<published>2014-05-14T23:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b38a134b22fbd0bed90f3e079bbf8cb2962a52be'/>
<id>urn:sha1:b38a134b22fbd0bed90f3e079bbf8cb2962a52be</id>
<content type='text'>
Invert it.

Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Signed-off-by: Dave Chinner &lt;david@fromorbit.com&gt;

</content>
</entry>
</feed>
