[Starlingx-discuss] Request for clarification related to gcc 8
Hi, Can I get clarification/context on these two bug stories that have been recently created? StarlingX does not use gcc 8 currently. What is the activity that is triggering this work? Which sub-team is looking at this? I wouldn't really consider these bugs as there was no requirement previously to support this compiler. If this is part of a new initiative, then we should have a [Feature] story that tracks this initiative with tasks for the different work items required to make the various Starlingx components compliant. https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks Thanks, Ghada Ghada Khalil, Manager, Titanium Cloud, Wind River direct 613.270.2273 skype ghada.khalil.ottawa 350 Terry Fox Drive, Suite 200, Kanata, ON K2K 2W5
+1 From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 11:48 AM To: starlingx-discuss@lists.starlingx.io Subject: [Starlingx-discuss] Request for clarification related to gcc 8 Hi, Can I get clarification/context on these two bug stories that have been recently created? StarlingX does not use gcc 8 currently. What is the activity that is triggering this work? Which sub-team is looking at this? I wouldn't really consider these bugs as there was no requirement previously to support this compiler. If this is part of a new initiative, then we should have a [Feature] story that tracks this initiative with tasks for the different work items required to make the various Starlingx components compliant. https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks Thanks, Ghada Ghada Khalil, Manager, Titanium Cloud, Wind River direct 613.270.2273 skype ghada.khalil.ottawa 350 Terry Fox Drive, Suite 200, Kanata, ON K2K 2W5
Hi, I created the two bugs. I'm using gcc 8 as a tool for finding issues that more evident with modern compilers. What I'm doing right now is to compile the C/C++ projects in an isolated environment to perform static analysis. I'm sorry that the title of the issues causes confusion, the two issues are there but gcc 4 doesn't show them. Let me elaborate more on this.
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
This issue is reported also by Coverity (and I think cppcheck as well). A string is stored without a null terminator. This is a security problem not a gcc 8 specific.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
This one is more tricky. An incorrect usage of a C struct inside C++ code, the difference between a reference and a pointer was confused in the code causing a segfault with optimized code in newer gcc versions. In our path for multi-os support, I think, it's expected to be able to build our projects in different compiler versions. Also, now that we are open source there will be people that will try to build this in clang or even a different architecture having use cases that haven't think about. I believe our code should be robust enough to be portable/flexible without breaking the existing functionality or breaking backwards compatibility with older compilers. I'll update the bugs to clarify the nature of the issues. -Erich On Tue, 2018-08-21 at 15:50 +0000, Rowsell, Brent wrote:
+1
From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 11:48 AM To: starlingx-discuss@lists.starlingx.io Subject: [Starlingx-discuss] Request for clarification related to gcc 8
Hi, Can I get clarification/context on these two bug stories that have been recently created? StarlingX does not use gcc 8 currently. What is the activity that is triggering this work? Which sub-team is looking at this?
I wouldn’t really consider these bugs as there was no requirement previously to support this compiler.
If this is part of a new initiative, then we should have a [Feature] story that tracks this initiative with tasks for the different work items required to make the various Starlingx components compliant.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
Thanks, Ghada
Ghada Khalil, Manager, Titanium Cloud, Wind River direct 613.270.2273 skype ghada.khalil.ottawa 350 Terry Fox Drive, Suite 200, Kanata, ON K2K 2W5
_______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Hi Erich, Thank you for your response. Perhaps we need to align on the definition of a bug. My definition of a bug is an issue that impacts the operation of starlingx software as it is built/used today. I don't consider issues found in code as a result of using a different compiler/tool/build env/distro a bug. I have no issue with the work itself. I just want it to be categorized properly as a feature/enhancement (ex: Support for gcc 8 in prep for multi-OS Support) with tasks that track the extent of the work instead of individual bug stories. Bruce, we can discuss story creation / categorization guidelines in the Wednesday meeting if needed. Thanks, Ghada -----Original Message----- From: Cordoba Malibran, Erich [mailto:erich.cordoba.malibran@intel.com] Sent: Tuesday, August 21, 2018 12:36 PM To: Rowsell, Brent; Khalil, Ghada; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 Hi, I created the two bugs. I'm using gcc 8 as a tool for finding issues that more evident with modern compilers. What I'm doing right now is to compile the C/C++ projects in an isolated environment to perform static analysis. I'm sorry that the title of the issues causes confusion, the two issues are there but gcc 4 doesn't show them. Let me elaborate more on this.
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
This issue is reported also by Coverity (and I think cppcheck as well). A string is stored without a null terminator. This is a security problem not a gcc 8 specific.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
This one is more tricky. An incorrect usage of a C struct inside C++ code, the difference between a reference and a pointer was confused in the code causing a segfault with optimized code in newer gcc versions. In our path for multi-os support, I think, it's expected to be able to build our projects in different compiler versions. Also, now that we are open source there will be people that will try to build this in clang or even a different architecture having use cases that haven't think about. I believe our code should be robust enough to be portable/flexible without breaking the existing functionality or breaking backwards compatibility with older compilers. I'll update the bugs to clarify the nature of the issues. -Erich On Tue, 2018-08-21 at 15:50 +0000, Rowsell, Brent wrote:
+1
From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 11:48 AM To: starlingx-discuss@lists.starlingx.io Subject: [Starlingx-discuss] Request for clarification related to gcc 8
Hi, Can I get clarification/context on these two bug stories that have been recently created? StarlingX does not use gcc 8 currently. What is the activity that is triggering this work? Which sub-team is looking at this?
I wouldn’t really consider these bugs as there was no requirement previously to support this compiler.
If this is part of a new initiative, then we should have a [Feature] story that tracks this initiative with tasks for the different work items required to make the various Starlingx components compliant.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
Thanks, Ghada
Ghada Khalil, Manager, Titanium Cloud, Wind River direct 613.270.2273 skype ghada.khalil.ottawa 350 Terry Fox Drive, Suite 200, Kanata, ON K2K 2W5
_______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Ghada wrote:
Perhaps we need to align on the definition of a bug. My definition of a bug is an issue that impacts the operation of starlingx software as it is built/used today. I don't consider issues found in code as a result of using a different compiler/tool/build env/distro a bug.
Code errors like this are bugs that have not yet been found. That may make them less important but it doesn't mean they are not bugs. Our goal should be to make our code as clean and bug free as possible. brucej -----Original Message----- From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 10:48 AM To: Cordoba Malibran, Erich <erich.cordoba.malibran@intel.com>; Rowsell, Brent <Brent.Rowsell@windriver.com>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 Hi Erich, Thank you for your response. Perhaps we need to align on the definition of a bug. My definition of a bug is an issue that impacts the operation of starlingx software as it is built/used today. I don't consider issues found in code as a result of using a different compiler/tool/build env/distro a bug. I have no issue with the work itself. I just want it to be categorized properly as a feature/enhancement (ex: Support for gcc 8 in prep for multi-OS Support) with tasks that track the extent of the work instead of individual bug stories. Bruce, we can discuss story creation / categorization guidelines in the Wednesday meeting if needed. Thanks, Ghada -----Original Message----- From: Cordoba Malibran, Erich [mailto:erich.cordoba.malibran@intel.com] Sent: Tuesday, August 21, 2018 12:36 PM To: Rowsell, Brent; Khalil, Ghada; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 Hi, I created the two bugs. I'm using gcc 8 as a tool for finding issues that more evident with modern compilers. What I'm doing right now is to compile the C/C++ projects in an isolated environment to perform static analysis. I'm sorry that the title of the issues causes confusion, the two issues are there but gcc 4 doesn't show them. Let me elaborate more on this.
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
This issue is reported also by Coverity (and I think cppcheck as well). A string is stored without a null terminator. This is a security problem not a gcc 8 specific.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
This one is more tricky. An incorrect usage of a C struct inside C++ code, the difference between a reference and a pointer was confused in the code causing a segfault with optimized code in newer gcc versions. In our path for multi-os support, I think, it's expected to be able to build our projects in different compiler versions. Also, now that we are open source there will be people that will try to build this in clang or even a different architecture having use cases that haven't think about. I believe our code should be robust enough to be portable/flexible without breaking the existing functionality or breaking backwards compatibility with older compilers. I'll update the bugs to clarify the nature of the issues. -Erich On Tue, 2018-08-21 at 15:50 +0000, Rowsell, Brent wrote:
+1
From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 11:48 AM To: starlingx-discuss@lists.starlingx.io Subject: [Starlingx-discuss] Request for clarification related to gcc 8
Hi, Can I get clarification/context on these two bug stories that have been recently created? StarlingX does not use gcc 8 currently. What is the activity that is triggering this work? Which sub-team is looking at this?
I wouldn’t really consider these bugs as there was no requirement previously to support this compiler.
If this is part of a new initiative, then we should have a [Feature] story that tracks this initiative with tasks for the different work items required to make the various Starlingx components compliant.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
Thanks, Ghada
Ghada Khalil, Manager, Titanium Cloud, Wind River direct 613.270.2273 skype ghada.khalil.ottawa 350 Terry Fox Drive, Suite 200, Kanata, ON K2K 2W5
_______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Bruce I agree on the first on that is a bug, regardless of the tool it is a security issue and should be triaged and assigned a priority to be fixed, but the second one is only an issue if you try to use gcc 8, under currently supported build process that is not a bug. So the second one would be better tracked under a feature that tracks all issues that need to be resolved to support the new compiler. Dariush -----Original Message----- From: Jones, Bruce E [mailto:bruce.e.jones@intel.com] Sent: August-21-18 2:52 PM To: Khalil, Ghada; Cordoba Malibran, Erich; Rowsell, Brent; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 Ghada wrote:
Perhaps we need to align on the definition of a bug. My definition of a bug is an issue that impacts the operation of starlingx software as it is built/used today. I don't consider issues found in code as a result of using a different compiler/tool/build env/distro a bug.
Code errors like this are bugs that have not yet been found. That may make them less important but it doesn't mean they are not bugs. Our goal should be to make our code as clean and bug free as possible. brucej -----Original Message----- From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 10:48 AM To: Cordoba Malibran, Erich <erich.cordoba.malibran@intel.com>; Rowsell, Brent <Brent.Rowsell@windriver.com>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 Hi Erich, Thank you for your response. Perhaps we need to align on the definition of a bug. My definition of a bug is an issue that impacts the operation of starlingx software as it is built/used today. I don't consider issues found in code as a result of using a different compiler/tool/build env/distro a bug. I have no issue with the work itself. I just want it to be categorized properly as a feature/enhancement (ex: Support for gcc 8 in prep for multi-OS Support) with tasks that track the extent of the work instead of individual bug stories. Bruce, we can discuss story creation / categorization guidelines in the Wednesday meeting if needed. Thanks, Ghada -----Original Message----- From: Cordoba Malibran, Erich [mailto:erich.cordoba.malibran@intel.com] Sent: Tuesday, August 21, 2018 12:36 PM To: Rowsell, Brent; Khalil, Ghada; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 Hi, I created the two bugs. I'm using gcc 8 as a tool for finding issues that more evident with modern compilers. What I'm doing right now is to compile the C/C++ projects in an isolated environment to perform static analysis. I'm sorry that the title of the issues causes confusion, the two issues are there but gcc 4 doesn't show them. Let me elaborate more on this.
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
This issue is reported also by Coverity (and I think cppcheck as well). A string is stored without a null terminator. This is a security problem not a gcc 8 specific.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
This one is more tricky. An incorrect usage of a C struct inside C++ code, the difference between a reference and a pointer was confused in the code causing a segfault with optimized code in newer gcc versions. In our path for multi-os support, I think, it's expected to be able to build our projects in different compiler versions. Also, now that we are open source there will be people that will try to build this in clang or even a different architecture having use cases that haven't think about. I believe our code should be robust enough to be portable/flexible without breaking the existing functionality or breaking backwards compatibility with older compilers. I'll update the bugs to clarify the nature of the issues. -Erich On Tue, 2018-08-21 at 15:50 +0000, Rowsell, Brent wrote:
+1
From: Khalil, Ghada [mailto:Ghada.Khalil@windriver.com] Sent: Tuesday, August 21, 2018 11:48 AM To: starlingx-discuss@lists.starlingx.io Subject: [Starlingx-discuss] Request for clarification related to gcc 8
Hi, Can I get clarification/context on these two bug stories that have been recently created? StarlingX does not use gcc 8 currently. What is the activity that is triggering this work? Which sub-team is looking at this?
I wouldn’t really consider these bugs as there was no requirement previously to support this compiler.
If this is part of a new initiative, then we should have a [Feature] story that tracks this initiative with tasks for the different work items required to make the various Starlingx components compliant.
https://storyboard.openstack.org/#!/story/2003497 [Bug] GCC 8 complains of invalid reference null check on fm_common
https://storyboard.openstack.org/#!/story/2003498 [Bug] fm-common cannot be built with GCC 8 due to string bound checks
Thanks, Ghada
Ghada Khalil, Manager, Titanium Cloud, Wind River direct 613.270.2273 skype ghada.khalil.ottawa 350 Terry Fox Drive, Suite 200, Kanata, ON K2K 2W5
_______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
On 08/21/2018 01:11 PM, Eslimi, Dariush wrote:
Bruce I agree on the first on that is a bug, regardless of the tool it is a security issue and should be triaged and assigned a priority to be fixed, but the second one is only an issue if you try to use gcc 8, under currently supported build process that is not a bug. So the second one would be better tracked under a feature that tracks all issues that need to be resolved to support the new compiler.
The second case is a classic strncpy() error scenario, which was why strlcpy() was created. In the second case, does the code properly handle the scenario where the resulting string has no null terminator? If the code expects the resulting string to be null-terminated then I think it should be counted as a bug rather than a "support new compiler" feature. Chris
If that is case Chris, then title of the bug should not be : "fm-common cannot be built with GCC 8 due to string bound checks" Dariush -----Original Message----- From: Chris Friesen [mailto:chris.friesen@windriver.com] Sent: August-21-18 3:20 PM To: starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 On 08/21/2018 01:11 PM, Eslimi, Dariush wrote:
Bruce I agree on the first on that is a bug, regardless of the tool it is a security issue and should be triaged and assigned a priority to be fixed, but the second one is only an issue if you try to use gcc 8, under currently supported build process that is not a bug. So the second one would be better tracked under a feature that tracks all issues that need to be resolved to support the new compiler.
The second case is a classic strncpy() error scenario, which was why strlcpy() was created. In the second case, does the code properly handle the scenario where the resulting string has no null terminator? If the code expects the resulting string to be null-terminated then I think it should be counted as a bug rather than a "support new compiler" feature. Chris _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
On 08/21/2018 01:26 PM, Eslimi, Dariush wrote:
If that is case Chris, then title of the bug should not be : "fm-common cannot be built with GCC 8 due to string bound checks"
Title has been changed. It is now: [Bug] GCC 8 highlights potentially-risky strncpy() usage in fm-common Chris
Both shall be tagged with "stx-security" bug in my opinion. Thx. - cindy -----Original Message----- From: Chris Friesen [mailto:chris.friesen@windriver.com] Sent: Wednesday, August 22, 2018 5:08 AM To: Eslimi, Dariush <Dariush.Eslimi@windriver.com>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 On 08/21/2018 01:26 PM, Eslimi, Dariush wrote:
If that is case Chris, then title of the bug should not be : "fm-common cannot be built with GCC 8 due to string bound checks"
Title has been changed. It is now: [Bug] GCC 8 highlights potentially-risky strncpy() usage in fm-common Chris _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
Cindy, At a higher level, what are the plans for gcc 8? Is this really part of the security strategy or part of moving the OS forward? All this needs to be discussed as we kick off the work in the security group's efforts. Right now, all the work feels adhoc. Regards, Ken Y On 2018-08-21, 8:23 PM, "Xie, Cindy" <cindy.xie@intel.com> wrote: Both shall be tagged with "stx-security" bug in my opinion. Thx. - cindy -----Original Message----- From: Chris Friesen [mailto:chris.friesen@windriver.com] Sent: Wednesday, August 22, 2018 5:08 AM To: Eslimi, Dariush <Dariush.Eslimi@windriver.com>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 On 08/21/2018 01:26 PM, Eslimi, Dariush wrote: > If that is case Chris, then title of the bug should not be : "fm-common cannot be built with GCC 8 due to string bound checks" Title has been changed. It is now: [Bug] GCC 8 highlights potentially-risky strncpy() usage in fm-common Chris _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
One of the reason behind exploring gcc 8 is because that is the one used in Clear Linux, as we are looking into support Clear Linux in some point in the future and we'll need to build these projects with a newer compiler. I think that this is not different from the effort to move from python 2 into python 3. BTW, the issue regarding the null reference is present since gcc 6, I pointed out into gcc 8 as was the first I tried. -Erich On 8/22/18, 8:40 AM, "Young, Ken" <Ken.Young@windriver.com> wrote: Cindy, At a higher level, what are the plans for gcc 8? Is this really part of the security strategy or part of moving the OS forward? All this needs to be discussed as we kick off the work in the security group's efforts. Right now, all the work feels adhoc. Regards, Ken Y On 2018-08-21, 8:23 PM, "Xie, Cindy" <cindy.xie@intel.com> wrote: Both shall be tagged with "stx-security" bug in my opinion. Thx. - cindy -----Original Message----- From: Chris Friesen [mailto:chris.friesen@windriver.com] Sent: Wednesday, August 22, 2018 5:08 AM To: Eslimi, Dariush <Dariush.Eslimi@windriver.com>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] Request for clarification related to gcc 8 On 08/21/2018 01:26 PM, Eslimi, Dariush wrote: > If that is case Chris, then title of the bug should not be : "fm-common cannot be built with GCC 8 due to string bound checks" Title has been changed. It is now: [Bug] GCC 8 highlights potentially-risky strncpy() usage in fm-common Chris _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
participants (8)
-
Chris Friesen
-
Cordoba Malibran, Erich
-
Eslimi, Dariush
-
Jones, Bruce E
-
Khalil, Ghada
-
Rowsell, Brent
-
Xie, Cindy
-
Young, Ken