You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by GitBox <gi...@apache.org> on 2022/04/12 06:49:00 UTC

[GitHub] [celix] xuzhenbao opened a new pull request, #413: Fix rsa use after free

xuzhenbao opened a new pull request, #413:
URL: https://github.com/apache/celix/pull/413

   #406 
   During the bundleActivator_stop of topology manager,  endpointDescription_destroy in endpointDiscoveryPoller_poll happened between serviceRegistration_unregister(activator->endpointListenerService) and topologyManager_closeImports. Thus use-after-free on endpoint follows.
   To ensure that endpoint has been removed from  topology manager before it is destoryed by discovery, I made the following changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [celix] xuzhenbao commented on a diff in pull request #413: Fix rsa use after free

Posted by GitBox <gi...@apache.org>.
xuzhenbao commented on code in PR #413:
URL: https://github.com/apache/celix/pull/413#discussion_r848200138


##########
bundles/remote_services/topology_manager/src/topology_manager.c:
##########
@@ -62,6 +62,7 @@ struct topology_manager {
 	celix_thread_mutex_t importedServicesLock;
 	celix_thread_mutexattr_t importedServicesLockAttr;
 	hash_map_pt importedServices;
+	bool stopAddImportedService;

Review Comment:
   It is a good idea, Thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [celix] codecov-commenter commented on pull request #413: Fix rsa use after free

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #413:
URL: https://github.com/apache/celix/pull/413#issuecomment-1096197266

   # [Codecov](https://codecov.io/gh/apache/celix/pull/413?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#413](https://codecov.io/gh/apache/celix/pull/413?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a35b63b) into [master](https://codecov.io/gh/apache/celix/commit/9cf8bc39c1a8916fbdda54eac59b24065f0fe3b2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9cf8bc3) will **decrease** coverage by `1.33%`.
   > The diff coverage is `87.50%`.
   
   > :exclamation: Current head a35b63b differs from pull request most recent head 7db1762. Consider uploading reports for the commit 7db1762 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #413      +/-   ##
   ==========================================
   - Coverage   73.12%   71.78%   -1.34%     
   ==========================================
     Files         205      180      -25     
     Lines       31274    29287    -1987     
   ==========================================
   - Hits        22870    21025    -1845     
   + Misses       8404     8262     -142     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/celix/pull/413?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ibs/pushstreams/api/celix/impl/PushEventConsumer.h](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9wdXNoc3RyZWFtcy9hcGkvY2VsaXgvaW1wbC9QdXNoRXZlbnRDb25zdW1lci5o) | `90.00% <ø> (-10.00%)` | :arrow_down: |
   | [...e\_service\_admin\_dfi/src/remote\_service\_admin\_dfi.c](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9yZW1vdGVfc2VydmljZV9hZG1pbl9kZmkuYw==) | `84.06% <87.50%> (-0.98%)` | :arrow_down: |
   | [...les/pubsub/pubsub\_admin\_zmq/src/pubsub\_zmq\_admin.c](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS9zcmMvcHVic3ViX3ptcV9hZG1pbi5j) | `52.96% <0.00%> (-13.93%)` | :arrow_down: |
   | [libs/framework/include/celix/dm/Component\_Impl.h](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9kbS9Db21wb25lbnRfSW1wbC5o) | `82.81% <0.00%> (-10.53%)` | :arrow_down: |
   | [...ibs/framework/include/celix/dm/ServiceDependency.h](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9kbS9TZXJ2aWNlRGVwZW5kZW5jeS5o) | `92.85% <0.00%> (-7.15%)` | :arrow_down: |
   | [...b/pubsub\_admin\_zmq/src/pubsub\_zmq\_topic\_receiver.c](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS9zcmMvcHVic3ViX3ptcV90b3BpY19yZWNlaXZlci5j) | `76.50% <0.00%> (-4.82%)` | :arrow_down: |
   | [...ramework/include/celix/dm/ServiceDependency\_Impl.h](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9mcmFtZXdvcmsvaW5jbHVkZS9jZWxpeC9kbS9TZXJ2aWNlRGVwZW5kZW5jeV9JbXBsLmg=) | `93.70% <0.00%> (-1.63%)` | :arrow_down: |
   | [...sub/pubsub\_admin\_zmq/src/pubsub\_zmq\_topic\_sender.c](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS9zcmMvcHVic3ViX3ptcV90b3BpY19zZW5kZXIuYw==) | `85.65% <0.00%> (-1.27%)` | :arrow_down: |
   | [bundles/pubsub/pubsub\_utils/src/pubsub\_utils.c](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX3V0aWxzL3NyYy9wdWJzdWJfdXRpbHMuYw==) | `68.88% <0.00%> (-1.12%)` | :arrow_down: |
   | ... and [31 more](https://codecov.io/gh/apache/celix/pull/413/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/celix/pull/413?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/celix/pull/413?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9cf8bc3...7db1762](https://codecov.io/gh/apache/celix/pull/413?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [celix] PengZheng commented on a diff in pull request #413: Fix rsa use after free

Posted by GitBox <gi...@apache.org>.
PengZheng commented on code in PR #413:
URL: https://github.com/apache/celix/pull/413#discussion_r848091707


##########
bundles/remote_services/topology_manager/src/topology_manager.c:
##########
@@ -62,6 +62,7 @@ struct topology_manager {
 	celix_thread_mutex_t importedServicesLock;
 	celix_thread_mutexattr_t importedServicesLockAttr;
 	hash_map_pt importedServices;
+	bool stopAddImportedService;

Review Comment:
   I suggest renaming it to `closed`. We should not try to add imported services to a closed listener.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [celix] pnoltes merged pull request #413: Fix rsa use after free

Posted by GitBox <gi...@apache.org>.
pnoltes merged PR #413:
URL: https://github.com/apache/celix/pull/413


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org