<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.2.61</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.2.61</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.2.61'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-07-11T12:33:58Z</updated>
<entry>
<title>target: Explicitly clear ramdisk_mcp backend pages</title>
<updated>2014-07-11T12:33:58Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-06-16T20:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbe9504c3a9f7cea3cd6d2660142d9b9bd5821f7'/>
<id>urn:sha1:bbe9504c3a9f7cea3cd6d2660142d9b9bd5821f7</id>
<content type='text'>
Part of commit 4442dc8a92b8f9ad8ee9e7f8438f4c04c03a22dc upstream.

This patch changes rd_allocate_sgl_table() to explicitly clear
ramdisk_mcp backend memory pages by passing __GFP_ZERO into
alloc_pages().

This addresses a potential security issue where reading from a
ramdisk_mcp could return sensitive information, and follows what
&gt;= v3.15 does to explicitly clear ramdisk_mcp memory at backend
device initialization time.

Reported-by: Jorge Daniel Sequeira Matias &lt;jdsm@tecnico.ulisboa.pt&gt;
Cc: Jorge Daniel Sequeira Matias &lt;jdsm@tecnico.ulisboa.pt&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target: Fix left-over se_lun-&gt;lun_sep pointer OOPs</title>
<updated>2014-07-11T12:33:55Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-06-16T20:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f5ec1a1dc36df4e56656e21ad4a02048bc101b9'/>
<id>urn:sha1:3f5ec1a1dc36df4e56656e21ad4a02048bc101b9</id>
<content type='text'>
commit 83ff42fcce070801a3aa1cd6a3269d7426271a8d upstream.

This patch fixes a left-over se_lun-&gt;lun_sep pointer OOPs when one
of the /sys/kernel/config/target/$FABRIC/$WWPN/$TPGT/lun/$LUN/alua*
attributes is accessed after the $DEVICE symlink has been removed.

To address this bug, go ahead and clear se_lun-&gt;lun_sep memory in
core_dev_unexport(), so that the existing checks for show/store
ALUA attributes in target_core_fabric_configfs.c work as expected.

Reported-by: Sebastian Herbszt &lt;herbszt@gmx.de&gt;
Tested-by: Sebastian Herbszt &lt;herbszt@gmx.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Reject mutual authentication with reflected CHAP_C</title>
<updated>2014-07-11T12:33:47Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-06-06T01:08:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ae0f3c0d18c443a72664577bdb70fe30f796b7d'/>
<id>urn:sha1:9ae0f3c0d18c443a72664577bdb70fe30f796b7d</id>
<content type='text'>
commit 1d2b60a5545942b1376cb48c1d55843d71e3a08f upstream.

This patch adds an explicit check in chap_server_compute_md5() to ensure
the CHAP_C value received from the initiator during mutual authentication
does not match the original CHAP_C provided by the target.

This is in line with RFC-3720, section 8.2.1:

   Originators MUST NOT reuse the CHAP challenge sent by the Responder
   for the other direction of a bidirectional authentication.
   Responders MUST check for this condition and close the iSCSI TCP
   connection if it occurs.

Reported-by: Tejas Vaykole &lt;tejas.vaykole@calsoftinc.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target/tcm_fc: Fix use-after-free of ft_tpg</title>
<updated>2014-04-30T15:23:26Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2014-04-04T23:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ff2fec9fc73d071d62460acea6c064105fd67e5'/>
<id>urn:sha1:6ff2fec9fc73d071d62460acea6c064105fd67e5</id>
<content type='text'>
commit 2c42be2dd4f6586728dba5c4e197afd5cfaded78 upstream.

ft_del_tpg checks tpg-&gt;tport is set before unlinking the tpg from the
tport when the tpg is being removed. Set this pointer in ft_tport_create,
or the unlinking won't happen in ft_del_tpg and tport-&gt;tpg will reference
a deleted object.

This patch sets tpg-&gt;tport in ft_tport_create, because that's what
ft_del_tpg checks, and is the only way to get back to the tport to
clear tport-&gt;tpg.

The bug was occuring when:

- lport created, tport (our per-lport, per-provider context) is
  allocated.
  tport-&gt;tpg = NULL
- tpg created
- a PRLI is received. ft_tport_create is called, tpg is found and
  tport-&gt;tpg is set
- tpg removed. ft_tpg is freed in ft_del_tpg. Since tpg-&gt;tport was not
  set, tport-&gt;tpg is not cleared and points at freed memory
- Future calls to ft_tport_create return tport via first conditional,
  instead of searching for new tpg by calling ft_lport_find_tpg.
  tport-&gt;tpg is still invalid, and will access freed memory.

see https://bugzilla.redhat.com/show_bug.cgi?id=1071340

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix ERL=2 ASYNC_EVENT connection pointer bug</title>
<updated>2014-04-30T15:23:25Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-19T23:32:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9acd41220b5addaf9d59b1e8825375d34803a375'/>
<id>urn:sha1:9acd41220b5addaf9d59b1e8825375d34803a375</id>
<content type='text'>
commit d444edc679e7713412f243b792b1f964e5cff1e1 upstream.

This patch fixes a long-standing bug in iscsit_build_conn_drop_async_message()
where during ERL=2 connection recovery, a bogus conn_p pointer could
end up being used to send the ISCSI_OP_ASYNC_EVENT + DROPPING_CONNECTION
notifying the initiator that cmd-&gt;logout_cid has failed.

The bug was manifesting itself as an OOPs in iscsit_allocate_cmd() with
a bogus conn_p pointer in iscsit_build_conn_drop_async_message().

Reported-by: Arshad Hussain &lt;arshad.hussain@calsoftinc.com&gt;
Reported-by: santosh kulkarni &lt;santosh.kulkarni@calsoftinc.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target/iscsi: Fix network portal creation race</title>
<updated>2014-04-01T23:58:46Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2014-01-25T00:18:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b1246d93e7af2d92e3652d96299fd2224c75ef7'/>
<id>urn:sha1:6b1246d93e7af2d92e3652d96299fd2224c75ef7</id>
<content type='text'>
commit ee291e63293146db64668e8d65eb35c97e8324f4 upstream.

When creating network portals rapidly, such as when restoring a
configuration, LIO's code to reuse existing portals can return a false
negative if the thread hasn't run yet and set np_thread_state to
ISCSI_NP_THREAD_ACTIVE. This causes an error in the network stack
when attempting to bind to the same address/port.

This patch sets NP_THREAD_ACTIVE before the np is placed on g_np_list,
so even if the thread hasn't run yet, iscsit_get_np will return the
existing np.

Also, convert np_lock -&gt; np_mutex + hold across adding new net portal
to g_np_list to prevent a race where two threads may attempt to create
the same network portal, resulting in one of them failing.

(nab: Add missing mutex_unlocks in iscsit_add_np failure paths)
(DanC: Fix incorrect spin_unlock -&gt; spin_unlock_bh)

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix-up all zero data-length CDBs with R/W_BIT set</title>
<updated>2014-02-15T19:20:13Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-11-25T22:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d92055f130b4f4d4c88f2029783fceab31c2577b'/>
<id>urn:sha1:d92055f130b4f4d4c88f2029783fceab31c2577b</id>
<content type='text'>
commit 4454b66cb67f14c33cd70ddcf0ff4985b26324b7 upstream.

This patch changes special case handling for ISCSI_OP_SCSI_CMD
where an initiator sends a zero length Expected Data Transfer
Length (EDTL), but still sets the WRITE and/or READ flag bits
when no payload transfer is requested.

Many, many moons ago two special cases where added for an ancient
version of ESX that has long since been fixed, so instead of adding
a new special case for the reported bug with a Broadcom 57800 NIC,
go ahead and always strip off the incorrect WRITE + READ flag bits.

Also, avoid sending a reject here, as RFC-3720 does mandate this
case be handled without protocol error.

Reported-by: Witold Bazakbal &lt;865perl@wp.pl&gt;
Tested-by: Witold Bazakbal &lt;865perl@wp.pl&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: chap auth shouldn't match username with trailing garbage</title>
<updated>2014-01-03T04:33:24Z</updated>
<author>
<name>Eric Seppanen</name>
<email>eric@purestorage.com</email>
</author>
<published>2013-11-20T22:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=47e67db4779d6fdb0d3a71283265a272d99af2b3'/>
<id>urn:sha1:47e67db4779d6fdb0d3a71283265a272d99af2b3</id>
<content type='text'>
commit 86784c6bdeeef78eed94d298be7a8879f6a97ee2 upstream.

In iSCSI negotiations with initiator CHAP enabled, usernames with
trailing garbage are permitted, because the string comparison only
checks the strlen of the configured username.

e.g. "usernameXXXXX" will be permitted to match "username".

Just check one more byte so the trailing null char is also matched.

Signed-off-by: Eric Seppanen &lt;eric@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: fix extract_param to handle buffer length corner case</title>
<updated>2014-01-03T04:33:23Z</updated>
<author>
<name>Eric Seppanen</name>
<email>eric@purestorage.com</email>
</author>
<published>2013-11-20T22:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d8fcca06072afed5d917c980ac233abd4f03e0b'/>
<id>urn:sha1:6d8fcca06072afed5d917c980ac233abd4f03e0b</id>
<content type='text'>
commit 369653e4fb511928511b0ce81f41c812ff1f28b6 upstream.

extract_param() is called with max_length set to the total size of the
output buffer.  It's not safe to allow a parameter length equal to the
buffer size as the terminating null would be written one byte past the
end of the output buffer.

Signed-off-by: Eric Seppanen &lt;eric@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target/pscsi: fix return value check</title>
<updated>2013-11-28T14:02:05Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-10-25T13:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5874fd1d23ed9a7a49802c2cfeed8d57b9ae303d'/>
<id>urn:sha1:5874fd1d23ed9a7a49802c2cfeed8d57b9ae303d</id>
<content type='text'>
commit 58932e96e438cd78f75e765d7b87ef39d3533d15 upstream.

In case of error, the function scsi_host_lookup() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: pscsi_configure_device() returns a pointer]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
