Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
de2d3883
Commit
de2d3883
authored
3 years ago
by
Ariadne Conill
Browse files
Options
Downloads
Patches
Plain Diff
main/mosquitto: add mitigation for CVE-2021-34432
parent
fb7e40bb
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/mosquitto/APKBUILD
+9
-3
9 additions, 3 deletions
main/mosquitto/APKBUILD
main/mosquitto/CVE-2021-34432.patch
+61
-0
61 additions, 0 deletions
main/mosquitto/CVE-2021-34432.patch
with
70 additions
and
3 deletions
main/mosquitto/APKBUILD
+
9
−
3
View file @
de2d3883
...
...
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
mosquitto
pkgver
=
1.6.12
pkgrel
=
2
pkgrel
=
3
pkgdesc
=
"An open source MQTT broker"
url
=
"https://mosquitto.org/"
arch
=
"all"
...
...
@@ -19,9 +19,12 @@ source="http://mosquitto.org/files/source/mosquitto-$pkgver.tar.gz
disable-ci-tests.patch
mosquitto.initd
mosquitto.confd
CVE-2021-34432.patch
"
# secfixes:
# 1.6.12-r3:
# - CVE-2021-34432
# 1.6.7-r0:
# - CVE-2019-11779
# 1.5.6-r0:
...
...
@@ -90,8 +93,11 @@ clients() {
mv
"
$pkgdir
"
/usr/bin/mosquitto_[ps]ub
"
$subpkgdir
"
/usr/bin/
}
sha512sums
=
"68cd2e4aa14254c0332ad78eac1f885e0e4e9f2332540d3778b8c7df096db7618b8467b5bb25f70ddc3306d01dd36eb9a9e2bf2738da77e196c7a1ccaed869d2 mosquitto-1.6.12.tar.gz
sha512sums
=
"
68cd2e4aa14254c0332ad78eac1f885e0e4e9f2332540d3778b8c7df096db7618b8467b5bb25f70ddc3306d01dd36eb9a9e2bf2738da77e196c7a1ccaed869d2 mosquitto-1.6.12.tar.gz
fb000f9fa1ef94cbf3811a23b5692c0c8f9e2df945959cef6005462715e99d6f75cf6b31bd496271ffc17634024aed986771a73962fef865c0d386f6c194fb33 config.patch
21df2006a5eb9e1248cf261e555ded8e80e79f2a2d2a55b1f8a153af7c0feb867f3b3bd71efbe4d8569e3031c65f3e144794724f012e7539244a9bd97b6b6bb3 disable-ci-tests.patch
a527813957b6f2d7afdb7269bade61d99b3023a147861b38902971929ff342a7c8c276bdb808fcfe7e48fa3e5c7521a16d777e5a3313256b8bf1e759cec5b7b0 mosquitto.initd
678a8aaefb9181f5f4998304046e5a8737049f90cf6bbbfd5fd4549592728afe77cb536547b39ad1598d53fe0b7c03e1506b2683e7b936712b9fad4a317f4b43 mosquitto.confd"
678a8aaefb9181f5f4998304046e5a8737049f90cf6bbbfd5fd4549592728afe77cb536547b39ad1598d53fe0b7c03e1506b2683e7b936712b9fad4a317f4b43 mosquitto.confd
5dfd7ac9a49284a08e75f36cea6ea7b5ed6126e5afb43ba4ecfe8efe38ddf6b15f52b1b1eff0b8901f065f0773595ed8f66757b70e12283a7d1a2e876b39f092 CVE-2021-34432.patch
"
This diff is collapsed.
Click to expand it.
main/mosquitto/CVE-2021-34432.patch
0 → 100644
+
61
−
0
View file @
de2d3883
From 9b08faf0bdaf5a4f2e6e3dd1ea7e8c57f70418d6 Mon Sep 17 00:00:00 2001
From: "Roger A. Light" <roger@atchoo.org>
Date: Tue, 9 Feb 2021 14:09:53 +0000
Subject: [PATCH] Fix mosquitto_{pub|sub}_topic_check() function returns.
The would not return MOSQ_ERR_INVAL on topic == NULL.
---
lib/util_topic.c | 19 ++++++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/lib/util_topic.c b/lib/util_topic.c
index fc24f0d1cb..62b531127c 100644
--- a/lib/util_topic.c
+++ b/lib/util_topic.c
@@ -54,6 +54,11 @@
int mosquitto_pub_topic_check(const char *str)
#ifdef WITH_BROKER
int hier_count = 0;
#endif
+
+ if(str == NULL){
+ return MOSQ_ERR_INVAL;
+ }
+
while(str && str[0]){
if(str[0] == '+' || str[0] == '#'){
return MOSQ_ERR_INVAL;
@@ -81,7 +86,9 @@
int mosquitto_pub_topic_check2(const char *str, size_t len)
int hier_count = 0;
#endif
- if(len > 65535) return MOSQ_ERR_INVAL;
+ if(str == NULL || len > 65535){
+ return MOSQ_ERR_INVAL;
+ }
for(i=0; i<len; i++){
if(str[i] == '+' || str[i] == '#'){
@@ -115,7 +122,11 @@
int mosquitto_sub_topic_check(const char *str)
int hier_count = 0;
#endif
- while(str && str[0]){
+ if(str == NULL){
+ return MOSQ_ERR_INVAL;
+ }
+
+ while(str[0]){
if(str[0] == '+'){
if((c != '\0' && c != '/') || (str[1] != '\0' && str[1] != '/')){
return MOSQ_ERR_INVAL;
@@ -150,7 +161,9 @@
int mosquitto_sub_topic_check2(const char *str, size_t len)
int hier_count = 0;
#endif
- if(len > 65535) return MOSQ_ERR_INVAL;
+ if(str == NULL || len > 65535){
+ return MOSQ_ERR_INVAL;
+ }
for(i=0; i<len; i++){
if(str[i] == '+'){
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment