* [dunfell][PATCH v2] dropbear: Fix CVE-2020-36254 [not found] <16C2B9B88AD918F7.22520@lists.openembedded.org> @ 2021-12-21 13:02 ` Ernst Sjöstrand 2021-12-21 13:07 ` [OE-core] " Konrad Weihmann 0 siblings, 1 reply; 5+ messages in thread From: Ernst Sjöstrand @ 2021-12-21 13:02 UTC (permalink / raw) To: openembedded-core, steve Dropbear shares a lot of code with other SSH implementations, so this is a port of CVE-2018-20685 to dropbear. Reference: https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com> --- Rename the patch file to make sure cve-check picks it up. meta/recipes-core/dropbear/dropbear.inc | 4 +++- .../dropbear/dropbear/CVE-2020-36254.patch | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc index d41e8b36dc..b949a9a337 100644 --- a/meta/recipes-core/dropbear/dropbear.inc +++ b/meta/recipes-core/dropbear/dropbear.inc @@ -22,7 +22,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ file://dropbear.socket \ file://dropbear.default \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} " + ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \ + file://CVE-2020-36254.patch \ + " PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ file://0006-dropbear-configuration-file.patch \ diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch new file mode 100644 index 0000000000..72ac3e6630 --- /dev/null +++ b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch @@ -0,0 +1,23 @@ +From c96c48d62aefc372f2105293ddf8cff2d116dc3a Mon Sep 17 00:00:00 2001 +From: Haelwenn Monnier <contact+github.com@hacktivis.me> +Date: Mon, 25 May 2020 14:54:29 +0200 +Subject: [PATCH] scp.c: Port OpenSSH CVE-2018-20685 fix (#80) + +--- + scp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scp.c b/scp.c +index 742ae00..7b8e7d2 100644 +--- a/scp.c ++++ b/scp.c +@@ -935,7 +935,8 @@ sink(int argc, char **argv) + size = size * 10 + (*cp++ - '0'); + if (*cp++ != ' ') + SCREWUP("size not delimited"); +- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { ++ if (*cp == '\0' || strchr(cp, '/') != NULL || ++ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { + run_err("error: unexpected filename: %s", cp); + exit(1); + } -- 2.34.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [dunfell][PATCH v2] dropbear: Fix CVE-2020-36254 2021-12-21 13:02 ` [dunfell][PATCH v2] dropbear: Fix CVE-2020-36254 Ernst Sjöstrand @ 2021-12-21 13:07 ` Konrad Weihmann 2021-12-21 13:34 ` Ernst Sjöstrand 0 siblings, 1 reply; 5+ messages in thread From: Konrad Weihmann @ 2021-12-21 13:07 UTC (permalink / raw) To: Ernst Sjöstrand, openembedded-core, steve On 21.12.21 14:02, Ernst Sjöstrand wrote: > Dropbear shares a lot of code with other SSH implementations, so this is > a port of CVE-2018-20685 to dropbear. > > Reference: > https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff > > Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com> This is missing an Upstream-Status entry - in this case that should be "Upstream-Status: Backport" > --- > Rename the patch file to make sure cve-check picks it up. > > meta/recipes-core/dropbear/dropbear.inc | 4 +++- > .../dropbear/dropbear/CVE-2020-36254.patch | 23 +++++++++++++++++++ > 2 files changed, 26 insertions(+), 1 deletion(-) > create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch > > diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc > index d41e8b36dc..b949a9a337 100644 > --- a/meta/recipes-core/dropbear/dropbear.inc > +++ b/meta/recipes-core/dropbear/dropbear.inc > @@ -22,7 +22,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ > file://dropbear.socket \ > file://dropbear.default \ > ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ > - ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} " > + ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \ > + file://CVE-2020-36254.patch \ > + " > > PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ > file://0006-dropbear-configuration-file.patch \ > diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch > new file mode 100644 > index 0000000000..72ac3e6630 > --- /dev/null > +++ b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch > @@ -0,0 +1,23 @@ > +From c96c48d62aefc372f2105293ddf8cff2d116dc3a Mon Sep 17 00:00:00 2001 > +From: Haelwenn Monnier <contact+github.com@hacktivis.me> > +Date: Mon, 25 May 2020 14:54:29 +0200 > +Subject: [PATCH] scp.c: Port OpenSSH CVE-2018-20685 fix (#80) > + > +--- > + scp.c | 3 ++- > + 1 file changed, 2 insertions(+), 1 deletion(-) > + > +diff --git a/scp.c b/scp.c > +index 742ae00..7b8e7d2 100644 > +--- a/scp.c > ++++ b/scp.c > +@@ -935,7 +935,8 @@ sink(int argc, char **argv) > + size = size * 10 + (*cp++ - '0'); > + if (*cp++ != ' ') > + SCREWUP("size not delimited"); > +- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { > ++ if (*cp == '\0' || strchr(cp, '/') != NULL || > ++ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { > + run_err("error: unexpected filename: %s", cp); > + exit(1); > + } > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#159916): https://lists.openembedded.org/g/openembedded-core/message/159916 > Mute This Topic: https://lists.openembedded.org/mt/87876568/3647476 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [kweihmann@outlook.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [dunfell][PATCH v2] dropbear: Fix CVE-2020-36254 2021-12-21 13:07 ` [OE-core] " Konrad Weihmann @ 2021-12-21 13:34 ` Ernst Sjöstrand 2021-12-21 13:57 ` Steve Sakoman 0 siblings, 1 reply; 5+ messages in thread From: Ernst Sjöstrand @ 2021-12-21 13:34 UTC (permalink / raw) To: openembedded-core On Tue, 2021-12-21 at 14:07 +0100, Konrad Weihmann wrote: > > On 21.12.21 14:02, Ernst Sjöstrand wrote: > > Dropbear shares a lot of code with other SSH implementations, so this is > > a port of CVE-2018-20685 to dropbear. > > > > Reference: > > https://urldefense.com/v3/__https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff__;!!BFCLnRDDbM3FOmw!qe9UYrBIPEc6nPIeOuTW0e0hW6_XwL0XE4vWFFUg-UeQcxixYMRQ__QllRTD9Iw88H1k2OWm0g$ > > > > Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com> > > This is missing an Upstream-Status entry - in this case that should be > "Upstream-Status: Backport" Should that line go in the .patch file, the commit message or both? I guess both? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [dunfell][PATCH v2] dropbear: Fix CVE-2020-36254 2021-12-21 13:34 ` Ernst Sjöstrand @ 2021-12-21 13:57 ` Steve Sakoman 2021-12-21 14:24 ` [dunfell][PATCH v3] " Ernst Sjöstrand 0 siblings, 1 reply; 5+ messages in thread From: Steve Sakoman @ 2021-12-21 13:57 UTC (permalink / raw) To: Ernst Sjöstrand; +Cc: openembedded-core On Tue, Dec 21, 2021 at 3:34 AM Ernst Sjöstrand <ernst.sjostrand@lists.verisure.com> wrote: > > On Tue, 2021-12-21 at 14:07 +0100, Konrad Weihmann wrote: > > > > On 21.12.21 14:02, Ernst Sjöstrand wrote: > > > Dropbear shares a lot of code with other SSH implementations, so this is > > > a port of CVE-2018-20685 to dropbear. > > > > > > Reference: > > > https://urldefense.com/v3/__https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff__;!!BFCLnRDDbM3FOmw!qe9UYrBIPEc6nPIeOuTW0e0hW6_XwL0XE4vWFFUg-UeQcxixYMRQ__QllRTD9Iw88H1k2OWm0g$ > > > > > > Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com> > > > > This is missing an Upstream-Status entry - in this case that should be > > "Upstream-Status: Backport" > > Should that line go in the .patch file, the commit message or both? > I guess both? See the "Patch name convention and commit message" section at: https://wiki.yoctoproject.org/wiki/Security Thanks for helping out with CVE fixes! Steve > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#159918): https://lists.openembedded.org/g/openembedded-core/message/159918 > Mute This Topic: https://lists.openembedded.org/mt/87876568/3620601 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [steve@sakoman.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dunfell][PATCH v3] dropbear: Fix CVE-2020-36254 2021-12-21 13:57 ` Steve Sakoman @ 2021-12-21 14:24 ` Ernst Sjöstrand 0 siblings, 0 replies; 5+ messages in thread From: Ernst Sjöstrand @ 2021-12-21 14:24 UTC (permalink / raw) To: steve; +Cc: openembedded-core Dropbear shares a lot of code with other SSH implementations, so this is a port of CVE-2018-20685 to dropbear by the dropbear developers. Reference: https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff CVE: CVE-2020-36254 Upstream-Status: Backport Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com> --- meta/recipes-core/dropbear/dropbear.inc | 4 ++- .../dropbear/dropbear/CVE-2020-36254.patch | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc index d41e8b36dcd..b949a9a3372 100644 --- a/meta/recipes-core/dropbear/dropbear.inc +++ b/meta/recipes-core/dropbear/dropbear.inc @@ -22,7 +22,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ file://dropbear.socket \ file://dropbear.default \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} " + ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \ + file://CVE-2020-36254.patch \ + " PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ file://0006-dropbear-configuration-file.patch \ diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch new file mode 100644 index 00000000000..64d0d96486c --- /dev/null +++ b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch @@ -0,0 +1,29 @@ +From c96c48d62aefc372f2105293ddf8cff2d116dc3a Mon Sep 17 00:00:00 2001 +From: Haelwenn Monnier <contact+github.com@hacktivis.me> +Date: Mon, 25 May 2020 14:54:29 +0200 +Subject: [PATCH] scp.c: Port OpenSSH CVE-2018-20685 fix (#80) + +Reference: +https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff + +CVE: CVE-2020-36254 +Upstream-Status: Backport + +--- + scp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scp.c b/scp.c +index 742ae00..7b8e7d2 100644 +--- a/scp.c ++++ b/scp.c +@@ -935,7 +935,8 @@ sink(int argc, char **argv) + size = size * 10 + (*cp++ - '0'); + if (*cp++ != ' ') + SCREWUP("size not delimited"); +- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { ++ if (*cp == '\0' || strchr(cp, '/') != NULL || ++ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { + run_err("error: unexpected filename: %s", cp); + exit(1); + } -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-21 14:25 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <16C2B9B88AD918F7.22520@lists.openembedded.org> 2021-12-21 13:02 ` [dunfell][PATCH v2] dropbear: Fix CVE-2020-36254 Ernst Sjöstrand 2021-12-21 13:07 ` [OE-core] " Konrad Weihmann 2021-12-21 13:34 ` Ernst Sjöstrand 2021-12-21 13:57 ` Steve Sakoman 2021-12-21 14:24 ` [dunfell][PATCH v3] " Ernst Sjöstrand
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.