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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: fix heap-use-after free on ns shutdown (backport #17020) #17141

Closed
wants to merge 1 commit into from

zebra: fix heap-use-after free on ns shutdown

ac98901
Select commit
Loading
Failed to load commit list.
Closed

zebra: fix heap-use-after free on ns shutdown (backport #17020) #17141

zebra: fix heap-use-after free on ns shutdown
ac98901
Select commit
Loading
Failed to load commit list.
frrbot / frrbot completed Oct 16, 2024 in 6s

Style and/or linter errors found

Style and/or linter errors found

Details

Thanks for your contribution to FRR!

Click for style suggestions

diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c
index f4d23de28..e11c90e18 100644
--- a/zebra/zebra_ns.c
+++ b/zebra/zebra_ns.c
@@ -157,7 +157,8 @@ int zebra_ns_early_shutdown(struct ns *ns,
 /* During zebra shutdown, do kernel cleanup
  * netlink sockets, ..
  */
-int zebra_ns_kernel_shutdown(struct ns *ns, void *param_in __attribute__((unused)),
+int zebra_ns_kernel_shutdown(struct ns *ns,
+			     void *param_in __attribute__((unused)),
 			     void **param_out __attribute__((unused)))
 {
 	struct zebra_ns *zns = ns->info;
diff --git a/zebra/zebra_ns.h b/zebra/zebra_ns.h
index 2579dd9cb..738fa1530 100644
--- a/zebra/zebra_ns.h
+++ b/zebra/zebra_ns.h
@@ -69,7 +69,8 @@ int zebra_ns_final_shutdown(struct ns *ns,
 <<<<<<< HEAD
 int zebra_ns_config_write(struct vty *vty, struct ns *ns);
 =======
-int zebra_ns_kernel_shutdown(struct ns *ns, void *param_in __attribute__((unused)),
+int zebra_ns_kernel_shutdown(struct ns *ns,
+			     void *param_in __attribute__((unused)),
 			     void **param_out __attribute__((unused)));
 
 void zebra_ns_startup_continue(struct zebra_dplane_ctx *ctx);

To apply the style suggestions:

curl https://gist.githubusercontent.com/polychaeta/4ad46dae9fd564fa0a1383b3be20959a/raw/ffe66c72b6686d540c7892feca0f17ab693de7cc/style.diff | git apply -

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.