<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/performance, branch v5.5</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>performance/write-behind: fix use-after-free in readdirp</title>
<updated>2019-02-22T14:50:00+00:00</updated>
<author>
<name>Raghavendra Gowdappa</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2019-02-13T11:38:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3c1368fda17b71a95edf1f4fe102e15f64820e3e'/>
<id>3c1368fda17b71a95edf1f4fe102e15f64820e3e</id>
<content type='text'>
Two issues were found:
1. in wb_readdirp_cbk, inode should unrefed after wb_inode is
unlocked. Otherwise, inode and hence the context wb_inode can be freed
by the type we try to unlock wb_inode
2. wb_readdirp_mark_end iterates over a list of wb_inodes of children
of a directory. But inodes could've been freed and hence the list
might be corrupted. To fix take a reference on inode before adding it
to invalidate_list of parent.

Change-Id: I911b0e0b2060f7f41ded0b05db11af6f9b7c09c5
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Updates: bz#1671556
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two issues were found:
1. in wb_readdirp_cbk, inode should unrefed after wb_inode is
unlocked. Otherwise, inode and hence the context wb_inode can be freed
by the type we try to unlock wb_inode
2. wb_readdirp_mark_end iterates over a list of wb_inodes of children
of a directory. But inodes could've been freed and hence the list
might be corrupted. To fix take a reference on inode before adding it
to invalidate_list of parent.

Change-Id: I911b0e0b2060f7f41ded0b05db11af6f9b7c09c5
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Updates: bz#1671556
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/write-behind: handle call-stub leaks</title>
<updated>2019-02-22T14:49:13+00:00</updated>
<author>
<name>Raghavendra Gowdappa</name>
<email>rgowdapp@redhat.com</email>
</author>
<published>2019-02-19T02:34:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ceee95dbc3c80d52134ceaee22e17c9f1c861300'/>
<id>ceee95dbc3c80d52134ceaee22e17c9f1c861300</id>
<content type='text'>
Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Fixes: bz#1671556
(cherry picked from commit 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d
Signed-off-by: Raghavendra Gowdappa &lt;rgowdapp@redhat.com&gt;
Fixes: bz#1671556
(cherry picked from commit 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9)
</pre>
</div>
</content>
</entry>
<entry>
<title>md-cache: Adapt integer data types to avoid integer overflow</title>
<updated>2019-02-20T14:00:05+00:00</updated>
<author>
<name>David Spisla</name>
<email>david.spisla@iternity.com</email>
</author>
<published>2019-02-19T13:56:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f6c8b1771f71bec287437dbec2e3b2e4f5692ef6'/>
<id>f6c8b1771f71bec287437dbec2e3b2e4f5692ef6</id>
<content type='text'>
The "struct iatt" in iatt.h is using int64_t types for storing
the atime, mtime and ctime. Therefore the struct 'struct md_cache' in
md-cache.c should also use this types to avoid an integer overflow.

This can happen e.g. if someone uses a very high default-retention-period
in the WORM-Xlator.

Change-Id: I605268d300ab622b9c8ab30e459dc00d9340aad1
fixes: bz#1678726
Signed-off-by: David Spisla &lt;david.spisla@iternity.com&gt;
(cherry picked from commit 15423e14f16dd1a15ee5e5cbbdbdd370e57ed59f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "struct iatt" in iatt.h is using int64_t types for storing
the atime, mtime and ctime. Therefore the struct 'struct md_cache' in
md-cache.c should also use this types to avoid an integer overflow.

This can happen e.g. if someone uses a very high default-retention-period
in the WORM-Xlator.

Change-Id: I605268d300ab622b9c8ab30e459dc00d9340aad1
fixes: bz#1678726
Signed-off-by: David Spisla &lt;david.spisla@iternity.com&gt;
(cherry picked from commit 15423e14f16dd1a15ee5e5cbbdbdd370e57ed59f)
</pre>
</div>
</content>
</entry>
<entry>
<title>readdir-ahead: do not zero-out iatt in fop cbk</title>
<updated>2019-02-04T14:52:59+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2019-01-29T06:21:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3f05fb00a090686bbdb0b467cec1f3647903b851'/>
<id>3f05fb00a090686bbdb0b467cec1f3647903b851</id>
<content type='text'>
...when ctime is zero. ia_type and ia_gfid always need to be non-zero
for things to work correctly.

Problem:
Commit c9bde3021202f1d5c5a2d19ac05a510fc1f788ac zeroed out the iatt
buffer in the cbks of modification fops before unwinding if the ctime in
the buffer was zero. This was causing the fops to fail: noticeable when
AFR's 'consistent-metadata' option was enabled. (AFR zeros out the ctime
when the option is set. See commit
4c4624c9bad2edf27128cb122c64f15d7d63bbc8).

Fixes:
-Do not zero out the ia_type and ia_gfid of the iatt buff under any
circumstance.
-Also, fixed _rda_inode_ctx_update_iatts() to always update these values from
the incoming buf when ctime is zero. Otherwise we end up with zero
ia_type and ia_gfid the first time the function is called *and* the
incoming buf has ctime set to zero.

fixes: bz#1665145
Reported-By:Michael Hanselmann &lt;public@hansmi.ch&gt;
Change-Id: Ib72228892d42c3513c19fc6dfb543f2aa3489eca
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 09db11b0c020bc79d493c6d7e7ea4f3beb000c68)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...when ctime is zero. ia_type and ia_gfid always need to be non-zero
for things to work correctly.

Problem:
Commit c9bde3021202f1d5c5a2d19ac05a510fc1f788ac zeroed out the iatt
buffer in the cbks of modification fops before unwinding if the ctime in
the buffer was zero. This was causing the fops to fail: noticeable when
AFR's 'consistent-metadata' option was enabled. (AFR zeros out the ctime
when the option is set. See commit
4c4624c9bad2edf27128cb122c64f15d7d63bbc8).

Fixes:
-Do not zero out the ia_type and ia_gfid of the iatt buff under any
circumstance.
-Also, fixed _rda_inode_ctx_update_iatts() to always update these values from
the incoming buf when ctime is zero. Otherwise we end up with zero
ia_type and ia_gfid the first time the function is called *and* the
incoming buf has ctime set to zero.

fixes: bz#1665145
Reported-By:Michael Hanselmann &lt;public@hansmi.ch&gt;
Change-Id: Ib72228892d42c3513c19fc6dfb543f2aa3489eca
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 09db11b0c020bc79d493c6d7e7ea4f3beb000c68)
</pre>
</div>
</content>
</entry>
<entry>
<title>core: Fixed typos in nl-cache and logging-guidelines.md</title>
<updated>2019-01-09T15:17:18+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-12-26T06:10:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0ec7da927915512c62c99b418a297c6132234c8b'/>
<id>0ec7da927915512c62c99b418a297c6132234c8b</id>
<content type='text'>
Replaced "recieve" with "receive".

Change-Id: I58a3d3d4a0093df4743de9fae4d8ff152d4b216c
fixes: bz#1662200
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
(cherry picked from commit a11c5c66321dd8411373a68cc163c981c7d083df)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced "recieve" with "receive".

Change-Id: I58a3d3d4a0093df4743de9fae4d8ff152d4b216c
fixes: bz#1662200
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
(cherry picked from commit a11c5c66321dd8411373a68cc163c981c7d083df)
</pre>
</div>
</content>
</entry>
<entry>
<title>io-cache: xdata needs to be passed for readv operations</title>
<updated>2018-12-30T13:32:00+00:00</updated>
<author>
<name>Soumya Koduri</name>
<email>skoduri@redhat.com</email>
</author>
<published>2018-11-28T08:44:00+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cee5f93ac00f628539f0367bc4958d59b98af011'/>
<id>cee5f93ac00f628539f0367bc4958d59b98af011</id>
<content type='text'>
io-cache xlator has been skipping xdata references when the
date needs to be read into page cache. This patch fixes the same.

Note: similar changes may be needed for other fops as well
which are handled by io-cache.

Change-Id: I28d73d4ba471d13eb55d0fd0b5197d222df77a2a
updates: bz#1651323
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit b3d88a0904131f6851f4185e43f815ecc3353ab5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
io-cache xlator has been skipping xdata references when the
date needs to be read into page cache. This patch fixes the same.

Note: similar changes may be needed for other fops as well
which are handled by io-cache.

Change-Id: I28d73d4ba471d13eb55d0fd0b5197d222df77a2a
updates: bz#1651323
Signed-off-by: Soumya Koduri &lt;skoduri@redhat.com&gt;
(cherry picked from commit b3d88a0904131f6851f4185e43f815ecc3353ab5)
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/rda:  Fixed dict_t memory leak</title>
<updated>2018-12-26T16:38:37+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2018-12-14T11:12:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0beca839679d437d49c7481cb7370e1350f16ba9'/>
<id>0beca839679d437d49c7481cb7370e1350f16ba9</id>
<content type='text'>
Removed all references to dict_t xdata_from_req which is
allocated but not used anywhere. It is also not cleaned up
and hence causes a memory leak.

fixes: bz#1659676

Change-Id: I2edb857696191e872ad12a12efc36999626bacc7
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed all references to dict_t xdata_from_req which is
allocated but not used anywhere. It is also not cleaned up
and hence causes a memory leak.

fixes: bz#1659676

Change-Id: I2edb857696191e872ad12a12efc36999626bacc7
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: fix the format string exceptions</title>
<updated>2018-11-09T14:03:02+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2018-11-06T17:17:41+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=83304fedb464fe3f97db662ce3e07bd948b7b7d9'/>
<id>83304fedb464fe3f97db662ce3e07bd948b7b7d9</id>
<content type='text'>
Currently, there are possibilities in few places, where a user-controlled
(like filename, program parameter etc) string can be passed as 'fmt' for
printf(), which can lead to segfault, if the user's string contains '%s',
'%d' in it.

While fixing it, makes sense to make the explicit check for such issues
across the codebase, by making the format call properly.

Fixes: CVE-2018-14661

Fixes: bz#1647666
Change-Id: Ib547293f2d9eb618594cbff0df3b9c800e88bde4
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, there are possibilities in few places, where a user-controlled
(like filename, program parameter etc) string can be passed as 'fmt' for
printf(), which can lead to segfault, if the user's string contains '%s',
'%d' in it.

While fixing it, makes sense to make the explicit check for such issues
across the codebase, by making the format call properly.

Fixes: CVE-2018-14661

Fixes: bz#1647666
Change-Id: Ib547293f2d9eb618594cbff0df3b9c800e88bde4
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mdcache: Fix asan reported potential heap buffer overflow</title>
<updated>2018-10-02T18:41:39+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-09-28T17:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9eeca96885560ee555826ca0eb4294d226928728'/>
<id>9eeca96885560ee555826ca0eb4294d226928728</id>
<content type='text'>
The char pointer mdc_xattr_str in function mdc_xattr_list_populate
is malloc'd and doing a strcat into a malloc'd region can
overflow content allocated based on prior contents of the
memory region.

Added a NULL terimation to the malloc'd region to prevent
the overflow, and treat it as an empty string.

Change-Id: If0decab669551581230a8ede4c44c319ff04bac9
Updates: bz#1635373
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
(cherry picked from commit d00a2a1b398346bbdc5ac9b3ba4b09fb1ce1e699)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The char pointer mdc_xattr_str in function mdc_xattr_list_populate
is malloc'd and doing a strcat into a malloc'd region can
overflow content allocated based on prior contents of the
memory region.

Added a NULL terimation to the malloc'd region to prevent
the overflow, and treat it as an empty string.

Change-Id: If0decab669551581230a8ede4c44c319ff04bac9
Updates: bz#1635373
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
(cherry picked from commit d00a2a1b398346bbdc5ac9b3ba4b09fb1ce1e699)
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: Update op-version from 4.2 to 5.0</title>
<updated>2018-09-17T14:26:25+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-09-13T16:50:30+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=afc9f3b8716e88410ba50a6ce8abbfa186ee7c46'/>
<id>afc9f3b8716e88410ba50a6ce8abbfa186ee7c46</id>
<content type='text'>
Post changing the max op-version to 4.2, after release
4.1 branching, the decision was to go with increasing
release numbers. Thus this needs to change to 5.0.

This commit addresses the above change.

Fixes: bz#1628668
Change-Id: Ifcc0c6da90fdd51e4eceea40749511110a432cce
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Post changing the max op-version to 4.2, after release
4.1 branching, the decision was to go with increasing
release numbers. Thus this needs to change to 5.0.

This commit addresses the above change.

Fixes: bz#1628668
Change-Id: Ifcc0c6da90fdd51e4eceea40749511110a432cce
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
