Bug 975175

Summary: tgtadm receives invalid request response
Product: [Fedora] Fedora Reporter: IBM Bug Proxy <bugproxy>
Component: scsi-target-utilsAssignee: Andy Grover <agrover>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: agrover, jkachuck, mchristi, terje.rosten, wgomerin
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-18 13:56:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Uses size_t for open_memstream size parameter. none

Description IBM Bug Proxy 2013-06-17 18:31:18 UTC
# tgtadm --lld iscsi --op new --mode target --tid 1 --targetname iqn.2010-10.org.example:volume-123
tgtadm: invalid request
#

It happens that tgtadm sends a request with 0 length because of a bug in concat_buf.

We should also remove the cast to size_t * on the call to open_memstream. First, because it's not needed with this patch, second because it hides bugs like this.

This also happens on Fedora 19 Beta, with scsi-target-utils 1.0.32-5.fc19, which is the same version for Fedora 18, with the only change in the release number being fc18 instead of fc19.

Regards.
Cascardo.

Could we please get the attached patch added do Fedora 18, 19 and 20 ?

Comment 1 IBM Bug Proxy 2013-06-17 18:31:35 UTC
Created attachment 762139 [details]
Uses size_t for open_memstream size parameter.

Comment 2 Andy Grover 2013-06-17 18:47:57 UTC
Great, nice catch.

Can we get this bug fixed upstream too? I'd say please go ahead and remove the cast you mentioned, and add a Signed-off-by line, then either send the updated patch to stgt.org, or attach it here and I'd be happy to help get it in.

Comment 3 IBM Bug Proxy 2013-06-17 20:40:34 UTC
------- Comment From thadeul.com 2013-06-17 20:37 EDT-------
(In reply to comment #9)
> Great, nice catch.
>
> Can we get this bug fixed upstream too? I'd say please go ahead and remove
> the cast you mentioned, and add a Signed-off-by line, then either send the
> updated patch to stgt.org, or attach it here and I'd be happy to
> help get it in.

Done. Thanks a lot for the suggestion. Let's see if it is applied.

Comment 4 IBM Bug Proxy 2013-06-18 13:01:06 UTC
------- Comment From thadeul.com 2013-06-18 12:54 EDT-------
(In reply to comment #10)
> (In reply to comment #9)
> > Great, nice catch.
> >
> > Can we get this bug fixed upstream too? I'd say please go ahead and remove
> > the cast you mentioned, and add a Signed-off-by line, then either send the
> > updated patch to stgt.org, or attach it here and I'd be happy to
> > help get it in.
>
> Done. Thanks a lot for the suggestion. Let's see if it is applied.
>
> Regards.
> Cascardo.

Applied as commit cfa068904894938ba61e4690f27794e2caf4a34b at http://github.com/fujita/tgt.git.

Regards.
Cascardo.

Comment 5 Andy Grover 2013-06-18 20:54:04 UTC
Thanks!!

I'll do updated packages that include this fix when the next version of tgt is released, next week.

Comment 6 Fedora End Of Life 2015-01-09 22:09:33 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2015-02-18 13:56:48 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.