Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.11] nanomq: add patches for CVE-2024-31040 & CVE-2024-31041 #310892

Merged

Conversation

risicle
Copy link
Contributor

@risicle risicle commented May 11, 2024

Description of changes

https://nvd.nist.gov/vuln/detail/CVE-2024-31040
https://nvd.nist.gov/vuln/detail/CVE-2024-31041

Unstable should be addressed by 0.21.9 which might happen in #284345

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 馃憤 reaction to pull requests you find important.

@pluiedev
Copy link
Contributor

Result of nixpkgs-review pr 310892 run on x86_64-linux 1

1 package built:
  • nanomq

@LeSuisse LeSuisse changed the title [23.05] nanomq: add patches for CVE-2024-31040 & CVE-2024-31041 [23.11] nanomq: add patches for CVE-2024-31040 & CVE-2024-31041 May 13, 2024
Copy link
Contributor

@LeSuisse LeSuisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds and seems to work fine. However the tests seems to be failing which is not the case on top of release-23.11. Is there another patch missing?

Result of nixpkgs-review pr 310892 run on aarch64-linux 1

1 package built:
  • nanomq
nanomq> Running phase: installCheckPhase
nanomq> mqtt v311 test start
nanomq> V4/V5 test passed!
nanomq> clean session test passed!
nanomq> Retain test passed!
nanomq> mqtt v311 test end
nanomq> mqtt v5 test start
nanomq> User property test passed!
nanomq> Shared subscription test passed!
nanomq> Sub client did not receive message * 10
nanomq> mosquitto_sub -h 127.0.0.1 -p 1883 -t 'topic'
nanomq> mosquitto_pub -h 127.0.0.1 -p 1883 -t topic -V 5 -m message -D Publish topic-alias 10 -d --repeat 10
nanomq> Topic alias test failed!
nanomq> mqtt v5 test failed
nanomq> 2024-05-13 11:42:43 [4064] WARN  /build/source/nng/src/sp/transport/mqtt/broker_tcp.c:872: tcptran_pipe_recv_cb: recv error rv: 139
nanomq> 
nanomq> 
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/apps/broker.c:244: RECV  ^^^^ ctx4 ^^^^
nanomq> 
nanomq> 
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1482: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 116
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1530: topic: [$SYS/brokers/disconnected], len: [25], qos: 0
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1573: used pos: [27]
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1584: payload: [{"username":"(null)","ts":1715600563658,"reason_code":"8b","client_id":"nanomq-82ba5ab2"}], len = 89
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1170: pipe_info size: [0]
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:962: topic is: topic, node->topic is: topic
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:997: Search and delete client
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:998: node->topic: 
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:81: ____________PRINT_DB_CLIENT___________
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:84: 1951111818	
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:86: 
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:88: ____________PRINT_DB_CLIENT___________
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:81: ____________PRINT_DB_CLIENT___________
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:84: 1951111818	
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:86: 
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nng/src/supplemental/nanolib/mqtt_db.c:88: ____________PRINT_DB_CLIENT___________
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/apps/broker.c:490: WAIT ^^^^ ctx4 ^^^^
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1266: free topic
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1282: free payload
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:1288: free pub_packet
nanomq> 
nanomq> 2024-05-13 11:42:43 [4064] DEBUG /build/source/nanomq/pub_handler.c:86: pub_handler: init pipe_info
nanomq> 
nanomq> Traceback (most recent call last):
nanomq>   File "/build/source/.github/scripts/test.py", line 55, in <module>
nanomq>     raise AssertionError
nanomq> AssertionError

@risicle
Copy link
Contributor Author

risicle commented May 13, 2024

The tests were already failing for me.

@LeSuisse
Copy link
Contributor

Hum yeah indeed, I tried to rebuild the tests on top of release-23.11 and got a failure this time 馃し , let's merge

@LeSuisse LeSuisse merged commit 9ddcaff into NixOS:release-23.11 May 14, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants