ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
@ 2018-09-11  1:11 Eduardo Valentin
  2018-09-11 11:57 ` Justin Forbes
  0 siblings, 1 reply; 8+ messages in thread
From: Eduardo Valentin @ 2018-09-11  1:11 UTC (permalink / raw)
  To: ksummit-discuss

Hello,

I would like to open a discussion on improving the annotation
around CVE patches on the Linux kernel. Today, the kernel Documentation
mentions about CVE assignment and asks as a good practice to at least
mention the CVE  number in the patch [1]. But, is that enough?
Should the kernel have more info about what patches fixes a specific
CVE?

Some of the challenges with current process:
- The info about of about what CVEs have been patched in a kernel is
  outside the kernel tree / git history.
- Today, some patches have the CVE info, and many others do not mention
  anything about CVE number.
- As mentioned in the kernel documentation [1], not always the CVE
  number is assigned when the patch(es) go into the kernel tree, so
  maybe this may require some post merge annotation?
- It is not always straight forward to know what patches are needed to
  fix the CVE, specially on cases the fix require a series of
  preparation work before the actual fix.

  Specially on the later case, annotation can help, specially while
  backporting.

BR,


[1] - https://www.kernel.org/doc/html/latest/admin-guide/security-bugs.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11  1:11 [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation Eduardo Valentin
@ 2018-09-11 11:57 ` Justin Forbes
  2018-09-11 12:00   ` Takashi Iwai
  0 siblings, 1 reply; 8+ messages in thread
From: Justin Forbes @ 2018-09-11 11:57 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: ksummit

On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> Hello,
>
> I would like to open a discussion on improving the annotation
> around CVE patches on the Linux kernel. Today, the kernel Documentation
> mentions about CVE assignment and asks as a good practice to at least
> mention the CVE  number in the patch [1]. But, is that enough?
> Should the kernel have more info about what patches fixes a specific
> CVE?
>
> Some of the challenges with current process:
> - The info about of about what CVEs have been patched in a kernel is
>   outside the kernel tree / git history.
> - Today, some patches have the CVE info, and many others do not mention
>   anything about CVE number.
> - As mentioned in the kernel documentation [1], not always the CVE
>   number is assigned when the patch(es) go into the kernel tree, so
>   maybe this may require some post merge annotation?

This is also sometimes relevant when you can fix and embargoed CVE
before embargo lifts because the actual fix doesn't make it obvious
that there is a security issue. Obfuscation is a somewhat useful tool
when fixing security bugs sometimes.  I would rather get the patches
in sooner than have them be properly annotated for the security fixes
they really are.

> - It is not always straight forward to know what patches are needed to
>   fix the CVE, specially on cases the fix require a series of
>   preparation work before the actual fix.
>
>   Specially on the later case, annotation can help, specially while
>   backporting.
>
It might be helpful in the cases where the fixes go in before the CVE
is announced/disclosed, to have the author send a summary once things
are public?

> BR,
>
>
> [1] - https://www.kernel.org/doc/html/latest/admin-guide/security-bugs.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11 11:57 ` Justin Forbes
@ 2018-09-11 12:00   ` Takashi Iwai
  2018-09-11 14:21     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2018-09-11 12:00 UTC (permalink / raw)
  To: Justin Forbes; +Cc: ksummit

On Tue, 11 Sep 2018 13:57:09 +0200,
Justin Forbes wrote:
> 
> On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > Hello,
> >
> > I would like to open a discussion on improving the annotation
> > around CVE patches on the Linux kernel. Today, the kernel Documentation
> > mentions about CVE assignment and asks as a good practice to at least
> > mention the CVE  number in the patch [1]. But, is that enough?
> > Should the kernel have more info about what patches fixes a specific
> > CVE?
> >
> > Some of the challenges with current process:
> > - The info about of about what CVEs have been patched in a kernel is
> >   outside the kernel tree / git history.
> > - Today, some patches have the CVE info, and many others do not mention
> >   anything about CVE number.
> > - As mentioned in the kernel documentation [1], not always the CVE
> >   number is assigned when the patch(es) go into the kernel tree, so
> >   maybe this may require some post merge annotation?
> 
> This is also sometimes relevant when you can fix and embargoed CVE
> before embargo lifts because the actual fix doesn't make it obvious
> that there is a security issue. Obfuscation is a somewhat useful tool
> when fixing security bugs sometimes.  I would rather get the patches
> in sooner than have them be properly annotated for the security fixes
> they really are.

I hoped that git-notes could be used for such additional post-release
notes.  But it seems that it never flies well due to various
reasons...


Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11 12:00   ` Takashi Iwai
@ 2018-09-11 14:21     ` Greg KH
  2018-09-11 14:35       ` Dan Carpenter
                         ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Greg KH @ 2018-09-11 14:21 UTC (permalink / raw)
  To: ksummit; +Cc: Justin Forbes

On Tue, Sep 11, 2018 at 02:00:58PM +0200, Takashi Iwai wrote:
> On Tue, 11 Sep 2018 13:57:09 +0200,
> Justin Forbes wrote:
> > 
> > On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > > Hello,
> > >
> > > I would like to open a discussion on improving the annotation
> > > around CVE patches on the Linux kernel. Today, the kernel Documentation
> > > mentions about CVE assignment and asks as a good practice to at least
> > > mention the CVE  number in the patch [1]. But, is that enough?
> > > Should the kernel have more info about what patches fixes a specific
> > > CVE?
> > >
> > > Some of the challenges with current process:
> > > - The info about of about what CVEs have been patched in a kernel is
> > >   outside the kernel tree / git history.
> > > - Today, some patches have the CVE info, and many others do not mention
> > >   anything about CVE number.
> > > - As mentioned in the kernel documentation [1], not always the CVE
> > >   number is assigned when the patch(es) go into the kernel tree, so
> > >   maybe this may require some post merge annotation?
> > 
> > This is also sometimes relevant when you can fix and embargoed CVE
> > before embargo lifts because the actual fix doesn't make it obvious
> > that there is a security issue. Obfuscation is a somewhat useful tool
> > when fixing security bugs sometimes.  I would rather get the patches
> > in sooner than have them be properly annotated for the security fixes
> > they really are.
> 
> I hoped that git-notes could be used for such additional post-release
> notes.  But it seems that it never flies well due to various
> reasons...

I do remember a tree somewhere on github that had a tracking between
cves and kernel commits.  It was a pain to keep up to date, but the
author was doing a good job for a number of months.

Can't find it now...

Anyway, the main problem here is that almost all the time, CVEs are
assigned _after_ the patch is in the kernel tree.  And we can't go back
in time to change a changelog entry.

Also, what about huge series of patches all to fix one CVE?  What would
you put down for the single Meltdown commit?

So this is up to those that wish to track these types of things, good
luck!

And yes, this is my "CVEs are a joke" feelings coming through here,
sorry if you are someone who has to treat them as something important...

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11 14:21     ` Greg KH
@ 2018-09-11 14:35       ` Dan Carpenter
  2018-09-11 14:37       ` Takashi Iwai
  2018-09-11 14:45       ` Leon Romanovsky
  2 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2018-09-11 14:35 UTC (permalink / raw)
  To: Greg KH; +Cc: Justin Forbes, ksummit

On Tue, Sep 11, 2018 at 04:21:34PM +0200, Greg KH wrote:
> On Tue, Sep 11, 2018 at 02:00:58PM +0200, Takashi Iwai wrote:
> > On Tue, 11 Sep 2018 13:57:09 +0200,
> > Justin Forbes wrote:
> > > 
> > > On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > > > Hello,
> > > >
> > > > I would like to open a discussion on improving the annotation
> > > > around CVE patches on the Linux kernel. Today, the kernel Documentation
> > > > mentions about CVE assignment and asks as a good practice to at least
> > > > mention the CVE  number in the patch [1]. But, is that enough?
> > > > Should the kernel have more info about what patches fixes a specific
> > > > CVE?
> > > >
> > > > Some of the challenges with current process:
> > > > - The info about of about what CVEs have been patched in a kernel is
> > > >   outside the kernel tree / git history.
> > > > - Today, some patches have the CVE info, and many others do not mention
> > > >   anything about CVE number.
> > > > - As mentioned in the kernel documentation [1], not always the CVE
> > > >   number is assigned when the patch(es) go into the kernel tree, so
> > > >   maybe this may require some post merge annotation?
> > > 
> > > This is also sometimes relevant when you can fix and embargoed CVE
> > > before embargo lifts because the actual fix doesn't make it obvious
> > > that there is a security issue. Obfuscation is a somewhat useful tool
> > > when fixing security bugs sometimes.  I would rather get the patches
> > > in sooner than have them be properly annotated for the security fixes
> > > they really are.
> > 
> > I hoped that git-notes could be used for such additional post-release
> > notes.  But it seems that it never flies well due to various
> > reasons...
> 
> I do remember a tree somewhere on github that had a tracking between
> cves and kernel commits.  It was a pain to keep up to date, but the
> author was doing a good job for a number of months.
> 
> Can't find it now...

Eugene Teo ran one.  But that was years ago.  It's probably easier to
just use the Ubuntu break/fix CVE list.

https://launchpad.net/ubuntu-cve-tracker

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11 14:21     ` Greg KH
  2018-09-11 14:35       ` Dan Carpenter
@ 2018-09-11 14:37       ` Takashi Iwai
  2018-09-11 14:45       ` Leon Romanovsky
  2 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2018-09-11 14:37 UTC (permalink / raw)
  To: Greg KH; +Cc: Justin Forbes, ksummit

On Tue, 11 Sep 2018 16:21:34 +0200,
Greg KH wrote:
> 
> On Tue, Sep 11, 2018 at 02:00:58PM +0200, Takashi Iwai wrote:
> > On Tue, 11 Sep 2018 13:57:09 +0200,
> > Justin Forbes wrote:
> > > 
> > > On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > > > Hello,
> > > >
> > > > I would like to open a discussion on improving the annotation
> > > > around CVE patches on the Linux kernel. Today, the kernel Documentation
> > > > mentions about CVE assignment and asks as a good practice to at least
> > > > mention the CVE  number in the patch [1]. But, is that enough?
> > > > Should the kernel have more info about what patches fixes a specific
> > > > CVE?
> > > >
> > > > Some of the challenges with current process:
> > > > - The info about of about what CVEs have been patched in a kernel is
> > > >   outside the kernel tree / git history.
> > > > - Today, some patches have the CVE info, and many others do not mention
> > > >   anything about CVE number.
> > > > - As mentioned in the kernel documentation [1], not always the CVE
> > > >   number is assigned when the patch(es) go into the kernel tree, so
> > > >   maybe this may require some post merge annotation?
> > > 
> > > This is also sometimes relevant when you can fix and embargoed CVE
> > > before embargo lifts because the actual fix doesn't make it obvious
> > > that there is a security issue. Obfuscation is a somewhat useful tool
> > > when fixing security bugs sometimes.  I would rather get the patches
> > > in sooner than have them be properly annotated for the security fixes
> > > they really are.
> > 
> > I hoped that git-notes could be used for such additional post-release
> > notes.  But it seems that it never flies well due to various
> > reasons...
> 
> I do remember a tree somewhere on github that had a tracking between
> cves and kernel commits.  It was a pain to keep up to date, but the
> author was doing a good job for a number of months.
> 
> Can't find it now...
> 
> Anyway, the main problem here is that almost all the time, CVEs are
> assigned _after_ the patch is in the kernel tree.  And we can't go back
> in time to change a changelog entry.

Actually, git-notes is exactly for that purpose: adding notes after
the commit.  Say, you have a shiny new CVE for the commit in 4.19-rc2,
and you can put the CVE number in each commit via git-notes.  Then
git-log will show that notes, and you can search over the notes in a
(sort of) namespace, too.

The same would work for the reverse-mapping of Fixes tag, too, BTW.

The pain point of git-notes is the way to share the notes.
Also it's not really scalable.  But for the amount of CVE numbering,
it should suffice, I guess.

> Also, what about huge series of patches all to fix one CVE?  What would
> you put down for the single Meltdown commit?
> 
> So this is up to those that wish to track these types of things, good
> luck!
> 
> And yes, this is my "CVEs are a joke" feelings coming through here,
> sorry if you are someone who has to treat them as something important...

Heh, I share your feeling :)


thanks,

Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11 14:21     ` Greg KH
  2018-09-11 14:35       ` Dan Carpenter
  2018-09-11 14:37       ` Takashi Iwai
@ 2018-09-11 14:45       ` Leon Romanovsky
  2018-09-11 15:02         ` Greg KH
  2 siblings, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2018-09-11 14:45 UTC (permalink / raw)
  To: Greg KH; +Cc: Justin Forbes, ksummit

[-- Attachment #1: Type: text/plain, Size: 3221 bytes --]

On Tue, Sep 11, 2018 at 04:21:34PM +0200, Greg KH wrote:
> On Tue, Sep 11, 2018 at 02:00:58PM +0200, Takashi Iwai wrote:
> > On Tue, 11 Sep 2018 13:57:09 +0200,
> > Justin Forbes wrote:
> > >
> > > On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > > > Hello,
> > > >
> > > > I would like to open a discussion on improving the annotation
> > > > around CVE patches on the Linux kernel. Today, the kernel Documentation
> > > > mentions about CVE assignment and asks as a good practice to at least
> > > > mention the CVE  number in the patch [1]. But, is that enough?
> > > > Should the kernel have more info about what patches fixes a specific
> > > > CVE?
> > > >
> > > > Some of the challenges with current process:
> > > > - The info about of about what CVEs have been patched in a kernel is
> > > >   outside the kernel tree / git history.
> > > > - Today, some patches have the CVE info, and many others do not mention
> > > >   anything about CVE number.
> > > > - As mentioned in the kernel documentation [1], not always the CVE
> > > >   number is assigned when the patch(es) go into the kernel tree, so
> > > >   maybe this may require some post merge annotation?
> > >
> > > This is also sometimes relevant when you can fix and embargoed CVE
> > > before embargo lifts because the actual fix doesn't make it obvious
> > > that there is a security issue. Obfuscation is a somewhat useful tool
> > > when fixing security bugs sometimes.  I would rather get the patches
> > > in sooner than have them be properly annotated for the security fixes
> > > they really are.
> >
> > I hoped that git-notes could be used for such additional post-release
> > notes.  But it seems that it never flies well due to various
> > reasons...
>
> I do remember a tree somewhere on github that had a tracking between
> cves and kernel commits.  It was a pain to keep up to date, but the
> author was doing a good job for a number of months.
>
> Can't find it now...
>
> Anyway, the main problem here is that almost all the time, CVEs are
> assigned _after_ the patch is in the kernel tree.  And we can't go back
> in time to change a changelog entry.

Greg,

There is another huge problem - legal complications vs. desire to
upstream fix as fast as possible.

Most probably all HW vendors are tied with legal contracts to provide to
their customers fix to security breach in advance, before making it
publicly available.

It means that putting CVE in changelogs will require from such HW
vendors to delay ALL CVE patches, while current legal situation allows
them to fix without too much noise and inform all relevant parties in
parallel.

>
> Also, what about huge series of patches all to fix one CVE?  What would
> you put down for the single Meltdown commit?
>
> So this is up to those that wish to track these types of things, good
> luck!
>
> And yes, this is my "CVEs are a joke" feelings coming through here,
> sorry if you are someone who has to treat them as something important...
>
> greg k-h
> _______________________________________________
> Ksummit-discuss mailing list
> Ksummit-discuss@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/ksummit-discuss

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation
  2018-09-11 14:45       ` Leon Romanovsky
@ 2018-09-11 15:02         ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2018-09-11 15:02 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: ksummit, Justin Forbes

On Tue, Sep 11, 2018 at 05:45:23PM +0300, Leon Romanovsky wrote:
> On Tue, Sep 11, 2018 at 04:21:34PM +0200, Greg KH wrote:
> > On Tue, Sep 11, 2018 at 02:00:58PM +0200, Takashi Iwai wrote:
> > > On Tue, 11 Sep 2018 13:57:09 +0200,
> > > Justin Forbes wrote:
> > > >
> > > > On Mon, Sep 10, 2018 at 8:11 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I would like to open a discussion on improving the annotation
> > > > > around CVE patches on the Linux kernel. Today, the kernel Documentation
> > > > > mentions about CVE assignment and asks as a good practice to at least
> > > > > mention the CVE  number in the patch [1]. But, is that enough?
> > > > > Should the kernel have more info about what patches fixes a specific
> > > > > CVE?
> > > > >
> > > > > Some of the challenges with current process:
> > > > > - The info about of about what CVEs have been patched in a kernel is
> > > > >   outside the kernel tree / git history.
> > > > > - Today, some patches have the CVE info, and many others do not mention
> > > > >   anything about CVE number.
> > > > > - As mentioned in the kernel documentation [1], not always the CVE
> > > > >   number is assigned when the patch(es) go into the kernel tree, so
> > > > >   maybe this may require some post merge annotation?
> > > >
> > > > This is also sometimes relevant when you can fix and embargoed CVE
> > > > before embargo lifts because the actual fix doesn't make it obvious
> > > > that there is a security issue. Obfuscation is a somewhat useful tool
> > > > when fixing security bugs sometimes.  I would rather get the patches
> > > > in sooner than have them be properly annotated for the security fixes
> > > > they really are.
> > >
> > > I hoped that git-notes could be used for such additional post-release
> > > notes.  But it seems that it never flies well due to various
> > > reasons...
> >
> > I do remember a tree somewhere on github that had a tracking between
> > cves and kernel commits.  It was a pain to keep up to date, but the
> > author was doing a good job for a number of months.
> >
> > Can't find it now...
> >
> > Anyway, the main problem here is that almost all the time, CVEs are
> > assigned _after_ the patch is in the kernel tree.  And we can't go back
> > in time to change a changelog entry.
> 
> Greg,
> 
> There is another huge problem - legal complications vs. desire to
> upstream fix as fast as possible.
> 
> Most probably all HW vendors are tied with legal contracts to provide to
> their customers fix to security breach in advance, before making it
> publicly available.
> 
> It means that putting CVE in changelogs will require from such HW
> vendors to delay ALL CVE patches, while current legal situation allows
> them to fix without too much noise and inform all relevant parties in
> parallel.

Yet another good reason why we will never require this :)

thanks for bringing it up,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-11 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11  1:11 [Ksummit-discuss] [MAINTAINERS SUMMIT] CVE patches annotation Eduardo Valentin
2018-09-11 11:57 ` Justin Forbes
2018-09-11 12:00   ` Takashi Iwai
2018-09-11 14:21     ` Greg KH
2018-09-11 14:35       ` Dan Carpenter
2018-09-11 14:37       ` Takashi Iwai
2018-09-11 14:45       ` Leon Romanovsky
2018-09-11 15:02         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox