xen-mfndump xch bug (was Re: New Defects reported by Coverity Scan for XenProject)
A message that is not in the archive (sent off-list or not yet received): [email protected]
[email protected] writes ("New Defects reported by Coverity Scan for XenProject"):
___________________________
Quoted 8 lines
*** CID 1191885: Dereference after null check (
FORWARD_NULL) /tools/misc/xen-mfndump.c: 401 inmain()
400 xch =xc_interface_open(0, 0, 0);Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
CID 1191885: Dereference after null check (
FORWARD_NULL) Comparing "xch" to null implies that "xch" might be null.401 if ( !xch )
402 {
403ERROR("Failed to open an xc handler");
This complaint is accurate. ERROR uses xch. (This is IMO not a security problem.)
Furthermore, I was rather startled to discover that xen-mfndump.c #includes <xc_private.h>.
Thanks,
Ian.
Quoted 5 lines · Ian Jackson
[email protected] writes ("New Defects reported by Coverity Scan for XenProject"):
___________________________Quoted 3 lines
*** CID 1191885: Dereference after null check (
FORWARD_NULL) /tools/misc/xen-mfndump.c: 401 inmain()
400 xch =xc_interface_open(0, 0, 0);
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
CID 1191885: Dereference after null check (
FORWARD_NULL) Comparing "xch" to null implies that "xch" might be null.401 if ( !xch )
402 {
403ERROR("Failed to open an xc handler");This complaint is accurate. ERROR uses xch. (This is IMO not a security problem.)
I think Andrew sent a patch (and its v2 also) about it already:
http://www.gossamer-threads.com/lists/xen/devel/320397
Quoted 3 lines
Furthermore, I was rather startled to discover that
xen-mfndump.c#includes <xc_private.h>.
Makes sense... Sorry for that. I think I remember, when working on it, starting from copying tools/misc/xen-hptool.c, and then modifying it for my purposes. I probably just left the #include-s untouched without much thinking.
Do you want me to try to remove it and send a patch to that effect?
Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · Dario Faggioli
Quoted 1 line · Ian Jackson
[email protected] writes ("New Defects reported by Coverity
Scan for XenProject"):
Quoted 10 lines
Quoted 10 lines
___________________________
Quoted 8 lines
*** CID 1191885: Dereference after null check (
FORWARD_NULL) /tools/misc/xen-mfndump.c: 401 inmain()
400 xch =xc_interface_open(0, 0, 0);Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
CID 1191885: Dereference after null check (
FORWARD_NULL) Comparing "xch" to null implies that "xch" might be null.401 if ( !xch )
402 {
403ERROR("Failed to open an xc handler");
Quoted 5 lines
Quoted 3 lines
This complaint is accurate. ERROR uses xch. (This is IMO not a security problem.)
I think Andrew sent a patch (and its v2 also) about it already:
http://www.gossamer-threads.com/lists/xen/devel/320397
Indeed I have - it has suitable acks and is pending committing now.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Dario Faggioli
Quoted 3 lines
Furthermore, I was rather startled to discover that
xen-mfndump.c#includes <xc_private.h>.Makes sense... Sorry for that. I think I remember, when working on it, starting from copying
tools/misc/xen-hptool.c
(begs the question why this guy needs it too, oh well)
Quoted 5 lines
, and then modifying it for
my purposes. I probably just left the #include-s untouched without much thinking.Do you want me to try to remove it and send a patch to that effect?
Yes Please.
Quoted 4 lines
Regards,
Dario
Quoted 9 lines · Ian Campbell
Quoted 5 lines · Dario Faggioli
Quoted 3 lines
Furthermore, I was rather startled to discover that
xen-mfndump.c#includes <xc_private.h>.Makes sense... Sorry for that. I think I remember, when working on it, starting from copying
tools/misc/xen-hptool.c(begs the question why this guy needs it too, oh well)
Indeed. :-)
Quoted 8 lines
Quoted 5 lines
, and then modifying it for
my purposes. I probably just left the #include-s untouched without much thinking.Do you want me to try to remove it and send a patch to that effect?
Yes Please.
I'll do, and try to kill both uses.
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Dario Faggioli writes ("Re: xen-mfndump xch bug (was Re: New Defects reported by Coverity Scan for XenProject)"):
Quoted 8 lines · Ian Jackson
Quoted 3 lines
Furthermore, I was rather startled to discover that
xen-mfndump.c#includes <xc_private.h>.Makes sense... Sorry for that. I think I remember, when working on it, starting from copying
tools/misc/xen-hptool.c, and then modifying it for my purposes. I probably just left the #include-s untouched without much thinking.
Ah, that would explain it.
Quoted 1 line
Do you want me to try to remove it and send a patch to that effect?
Not unless you're feeling really bored :-). Tidying up the in-tree libxc callers is probably something we can put off...
Thanks,
Ian.
Quoted 6 lines · Ian Jackson
Dario Faggioli writes ("Re: xen-mfndump xch bug (was Re: New Defects reported by Coverity Scan for XenProject)"):
Quoted 1 line
Do you want me to try to remove it and send a patch to that effect?
Not unless you're feeling really bored :-). Tidying up the in-tree libxc callers is probably something we can put off...
Right. Adding it to my "When really bored" TODO list :-)
Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel