<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.4.65</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.4.65</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.4.65'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-08T04:58:16Z</updated>
<entry>
<title>target: Fix trailing ASCII space usage in INQUIRY vendor+model</title>
<updated>2013-09-08T04:58:16Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-07-24T23:15:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e51c435e8f955faeb93c8a10f71d7ebf43d887db'/>
<id>urn:sha1:e51c435e8f955faeb93c8a10f71d7ebf43d887db</id>
<content type='text'>
commit ee60bddba5a5f23e39598195d944aa0eb2d455e5 upstream.

This patch fixes spc_emulate_inquiry_std() to add trailing ASCII
spaces for INQUIRY vendor + model fields following SPC-4 text:

  "ASCII data fields described as being left-aligned shall have any
   unused bytes at the end of the field (i.e., highest offset) and
   the unused bytes shall be filled with ASCII space characters (20h)."

This addresses a problem with Falconstor NSS multipathing.

Reported-by: Tomas Molota &lt;tomas.molota@lightstorm.sk&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow</title>
<updated>2013-08-04T08:25:41Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-07-03T15:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c447fb2bd2b310e34c74580a494e001312a58a68'/>
<id>urn:sha1:c447fb2bd2b310e34c74580a494e001312a58a68</id>
<content type='text'>
commit 0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6 upstream.

This patch fixes a potential buffer overflow while processing
iscsi_node_auth input for configfs attributes within NodeACL
tfc_tpg_nacl_auth_cit context.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()</title>
<updated>2013-06-27T18:27:33Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-05-30T20:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c3017e4b2d21feed4a510c1ee69aa77d2384493'/>
<id>urn:sha1:4c3017e4b2d21feed4a510c1ee69aa77d2384493</id>
<content type='text'>
commit 574780fd5e6ec52bd43e0bdb777a19e4c4c6aa9c upstream.

Here is a fun one.  Bug seems to have been introduced by commit 140854cb,
almost two years ago.  I have no idea why we only started seeing it now,
but we did.

Rough callgraph:
core_tpg_set_initiator_node_queue_depth()
`-&gt; spin_lock_irqsave(&amp;tpg-&gt;session_lock, flags);
`-&gt; lio_tpg_shutdown_session()
    `-&gt; iscsit_stop_time2retain_timer()
        `-&gt; spin_unlock_bh(&amp;se_tpg-&gt;session_lock);
        `-&gt; spin_lock_bh(&amp;se_tpg-&gt;session_lock);
`-&gt; spin_unlock_irqrestore(&amp;tpg-&gt;session_lock, flags);

core_tpg_set_initiator_node_queue_depth() used to call spin_lock_bh(),
but 140854cb changed that to spin_lock_irqsave().  However,
lio_tpg_shutdown_session() still claims to be called with spin_lock_bh()
held, as does iscsit_stop_time2retain_timer():
 *      Called with spin_lock_bh(&amp;struct se_portal_group-&gt;session_lock) held

Stale documentation is mostly annoying, but in this case the dropping
the lock with the _bh variant is plain wrong.  It is also wrong to drop
locks two functions below the lock-holder, but I will ignore that bit
for now.

After some more locking and unlocking we eventually hit this backtrace:
------------[ cut here ]------------
WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0xe8/0x100()
Pid: 24645, comm: lio_helper.py Tainted: G           O 3.6.11+
Call Trace:
 [&lt;ffffffff8103e5ff&gt;] warn_slowpath_common+0x7f/0xc0
 [&lt;ffffffffa040ae37&gt;] ? iscsit_inc_conn_usage_count+0x37/0x50 [iscsi_target_mod]
 [&lt;ffffffff8103e65a&gt;] warn_slowpath_null+0x1a/0x20
 [&lt;ffffffff810472f8&gt;] local_bh_enable_ip+0xe8/0x100
 [&lt;ffffffff815b8365&gt;] _raw_spin_unlock_bh+0x15/0x20
 [&lt;ffffffffa040ae37&gt;] iscsit_inc_conn_usage_count+0x37/0x50 [iscsi_target_mod]
 [&lt;ffffffffa041149a&gt;] iscsit_stop_session+0xfa/0x1c0 [iscsi_target_mod]
 [&lt;ffffffffa0417fab&gt;] lio_tpg_shutdown_session+0x7b/0x90 [iscsi_target_mod]
 [&lt;ffffffffa033ede4&gt;] core_tpg_set_initiator_node_queue_depth+0xe4/0x290 [target_core_mod]
 [&lt;ffffffffa0409032&gt;] iscsit_tpg_set_initiator_node_queue_depth+0x12/0x20 [iscsi_target_mod]
 [&lt;ffffffffa0415c29&gt;] lio_target_nacl_store_cmdsn_depth+0xa9/0x180 [iscsi_target_mod]
 [&lt;ffffffffa0331b49&gt;] target_fabric_nacl_base_attr_store+0x39/0x40 [target_core_mod]
 [&lt;ffffffff811b857d&gt;] configfs_write_file+0xbd/0x120
 [&lt;ffffffff81148f36&gt;] vfs_write+0xc6/0x180
 [&lt;ffffffff81149251&gt;] sys_write+0x51/0x90
 [&lt;ffffffff815c0969&gt;] system_call_fastpath+0x16/0x1b
---[ end trace 3747632b9b164652 ]---

As a pure band-aid, this patch drops the _bh.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;

</content>
</entry>
<entry>
<title>iscsi-target: fix heap buffer overflow on error</title>
<updated>2013-06-07T19:49:29Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-05-23T17:32:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7c12b0057706c0694c96c06a2988fed65c8c7515'/>
<id>urn:sha1:7c12b0057706c0694c96c06a2988fed65c8c7515</id>
<content type='text'>
commit cea4dcfdad926a27a18e188720efe0f2c9403456 upstream.

If a key was larger than 64 bytes, as checked by iscsi_check_key(), the
error response packet, generated by iscsi_add_notunderstood_response(),
would still attempt to copy the entire key into the packet, overflowing
the structure on the heap.

Remote preauthentication kernel memory corruption was possible if a
target was configured and listening on the network.

CVE-2013-2850

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Fix processing of OOO commands</title>
<updated>2013-05-19T17:54:49Z</updated>
<author>
<name>Shlomo Pongratz</name>
<email>shlomop@mellanox.com</email>
</author>
<published>2013-05-05T14:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=173603ab8ed8aff22b3606abf3b1dc591cc5ccd7'/>
<id>urn:sha1:173603ab8ed8aff22b3606abf3b1dc591cc5ccd7</id>
<content type='text'>
commit 3eccfdb01da58fbd0f789ae6ca61cee3769e26de upstream.

Fix two issues in OOO commands processing done at iscsit_attach_ooo_cmdsn.

Handle command serial numbers wrap around by using iscsi_sna_lt and not regular comparisson.

The routine iterates until it finds an entry whose serial number is greater than the serial number of
the new one, thus the new entry should be inserted before that entry and not after.

Signed-off-by: Shlomo Pongratz &lt;shlomop@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs</title>
<updated>2013-04-17T04:27:26Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-04-10T22:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eced4ec1b69c8cc5428ef29b947376bc6d57c8ce'/>
<id>urn:sha1:eced4ec1b69c8cc5428ef29b947376bc6d57c8ce</id>
<content type='text'>
commit 30f359a6f9da65a66de8cadf959f0f4a0d498bba upstream.

This patch fixes a bug where a handful of informational / control CDBs
that should be allowed during ALUA access state Standby/Offline/Transition
where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*.

This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN
registration when LUN scanning occured during these ALUA access states.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target/iscsi: Fix mutual CHAP auth on big-endian arches</title>
<updated>2013-03-28T19:12:13Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-03-04T21:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e8d94de159e7520e6ff1ecaf8419844b93631e7'/>
<id>urn:sha1:6e8d94de159e7520e6ff1ecaf8419844b93631e7</id>
<content type='text'>
commit 7ac9ad11b2a5cf77a92b58ee6b672ad2fa155eb1 upstream.

See https://bugzilla.redhat.com/show_bug.cgi?id=916290

Used a temp var since we take its address in sg_init_one.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target/pscsi: Fix page increment</title>
<updated>2013-03-14T18:29:42Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-02-27T05:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a5646410c2d80c4dd4692f5f6bc2fcdfc3aa557b'/>
<id>urn:sha1:a5646410c2d80c4dd4692f5f6bc2fcdfc3aa557b</id>
<content type='text'>
commit 472b72f2db7831d7dbe22ffdff4adee3bd49b05d upstream.

The page++ is wrong. It makes bio_add_pc_page() pointing to a wrong page
address if the 'while (len &gt; 0 &amp;&amp; data_len &gt; 0) { ... }' loop is
executed more than one once.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Add missing mapped_lun bounds checking during make_mappedlun setup</title>
<updated>2013-03-03T22:06:39Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-02-19T02:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=316857e5fe5391057d5a05f215e01d0deff7c473'/>
<id>urn:sha1:316857e5fe5391057d5a05f215e01d0deff7c473</id>
<content type='text'>
commit fbbf8555a986ed31e54f006b6cc637ea4ff1425b upstream.

This patch adds missing bounds checking for the configfs provided
mapped_lun value during target_fabric_make_mappedlun() setup ahead
of se_lun_acl initialization.

This addresses a potential OOPs when using a mapped_lun value that
exceeds the hardcoded TRANSPORT_MAX_LUNS_PER_TPG-1 value within
se_node_acl-&gt;device_list[].

Reported-by: Jan Engelhardt &lt;jengelh@inai.de&gt;
Cc: Jan Engelhardt &lt;jengelh@inai.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix lookup of dynamic NodeACLs during cached demo-mode operation</title>
<updated>2013-03-03T22:06:39Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-02-19T02:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fa4f7261d75cb6b35fdf8d329f5fd64e7354c58'/>
<id>urn:sha1:3fa4f7261d75cb6b35fdf8d329f5fd64e7354c58</id>
<content type='text'>
commit fcf29481fb8e106daad6688f2e898226ee928992 upstream.

This patch fixes a bug in core_tpg_check_initiator_node_acl() -&gt;
core_tpg_get_initiator_node_acl() where a dynamically created
se_node_acl generated during session login would be skipped during
subsequent lookup due to the '!acl-&gt;dynamic_node_acl' check, causing
a new se_node_acl to be created with a duplicate -&gt;initiatorname.

This would occur when a fabric endpoint was configured with
TFO-&gt;tpg_check_demo_mode()=1 + TPF-&gt;tpg_check_demo_mode_cache()=1
preventing the release of an existing se_node_acl during se_session
shutdown.

Also, drop the unnecessary usage of core_tpg_get_initiator_node_acl()
within core_dev_init_initiator_node_lun_acl() that originally
required the extra '!acl-&gt;dynamic_node_acl' check, and just pass
the configfs provided se_node_acl pointer instead.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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