]> Kevux Git Server - fll/commitdiff
Security: Invalid memory access in interrupt handlers.
authorKevin Day <thekevinday@gmail.com>
Thu, 23 Dec 2021 03:40:54 +0000 (21:40 -0600)
committerKevin Day <thekevinday@gmail.com>
Thu, 23 Dec 2021 03:40:54 +0000 (21:40 -0600)
When I converted the data_main into a pointer from a value, I failed to remove the references on these variables.
The compiler does not catch these because they are cast to a void *.

level_3/fake/c/private-build-load.c
level_3/fake/c/private-make-load_fakefile.c
level_3/fake/c/private-make-operate.c

index 2e706fa33afc8c7ffd72cdd2f8fb4018a2df7235..c251133a51d626e352d4ac4272a41d8da39d32f2 100644 (file)
@@ -114,7 +114,7 @@ extern "C" {
         f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
 
         {
-          f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0);
+          f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) main, 0);
 
           *status = fll_fss_extended_read(buffer, state, &range, &objects, &contents, 0, 0, &delimits, 0);
         }
index 05355d9ea6ce6cce416950d70f0953f3da8ca445..8fd4fa0e0f2de2a011434744831df602b2640009 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
       f_fss_comments_t comments = f_fss_comments_t_initialize;
 
       {
-        f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0);
+        f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) main, 0);
 
         *status = fll_fss_basic_list_read(data_make->buffer, state, &range, &list_objects, &list_contents, &delimits, 0, &comments);
       }
@@ -86,7 +86,7 @@ extern "C" {
 
       f_fss_set_t settings = f_fss_set_t_initialize;
 
-      f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0);
+      f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) main, 0);
 
       const f_string_static_t name_settings = macro_f_string_static_t_initialize(fake_make_section_settings_s, fake_make_section_settings_s_length);
       const f_string_static_t name_main = macro_f_string_static_t_initialize(fake_make_section_main_s, fake_make_section_main_s_length);
index aa2133ecf45c07ebb481d78ee66d593ff7625938..e02456d2d9e70dac6e26a05613270339c57f6cb0 100644 (file)
@@ -159,7 +159,7 @@ extern "C" {
     f_iki_content_t iki_content = f_iki_content_t_initialize;
     f_iki_delimits_t iki_delimits = f_iki_delimits_t_initialize;
 
-    f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_iki, 0, (void *) &main, 0);
+    f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_iki, 0, (void *) main, 0);
 
     f_string_range_t range = f_string_range_t_initialize;
     f_string_map_multis_t *parameter = &data_make->setting_make.parameter;