Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2021-01-20 18:23:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Wed Jan 20 18:23:25 2021 rev:291 rq:864280 version:7.0.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2021-01-18 
11:30:57.376601950 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new.28504/linuxrc.changes       
2021-01-20 18:23:35.215315919 +0100
@@ -1,0 +2,11 @@
+Tue Jan 19 10:15:46 UTC 2021 - wfe...@opensuse.org
+
+- merge gh#openSUSE/linuxrc#241
+- fix writing out of menu item array bounds (bsc#1180792)
+- use best fitting module config entry
+- update module loaded state properly
+- ensure modules are actually loaded in every code path
+- fix buffer overflow triggered by very long module descriptions
+- 7.0.25
+
+--------------------------------------------------------------------

Old:
----
  linuxrc-7.0.24.tar.xz

New:
----
  linuxrc-7.0.25.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.A9rRiD/_old  2021-01-20 18:23:36.191316641 +0100
+++ /var/tmp/diff_new_pack.A9rRiD/_new  2021-01-20 18:23:36.195316644 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           linuxrc
-Version:        7.0.24
+Version:        7.0.25
 Release:        0
 Summary:        SUSE Installation Program
 License:        GPL-3.0+

++++++ linuxrc-7.0.24.tar.xz -> linuxrc-7.0.25.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.24/VERSION new/linuxrc-7.0.25/VERSION
--- old/linuxrc-7.0.24/VERSION  2021-01-13 17:35:16.000000000 +0100
+++ new/linuxrc-7.0.25/VERSION  2021-01-19 11:15:46.000000000 +0100
@@ -1 +1 @@
-7.0.24
+7.0.25
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.24/changelog new/linuxrc-7.0.25/changelog
--- old/linuxrc-7.0.24/changelog        2021-01-13 17:35:16.000000000 +0100
+++ new/linuxrc-7.0.25/changelog        2021-01-19 11:15:46.000000000 +0100
@@ -1,3 +1,11 @@
+2021-01-19:    7.0.25
+       - merge gh#openSUSE/linuxrc#241
+       - fix writing out of menu item array bounds (bsc#1180792)
+       - use best fitting module config entry
+       - update module loaded state properly
+       - ensure modules are actually loaded in every code path
+       - fix buffer overflow triggered by very long module descriptions
+
 2021-01-13:    7.0.24
        - merge gh#openSUSE/linuxrc#239
        - fix detection of config file type (XML vs. plain text) bsc#1179936
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.24/module.c new/linuxrc-7.0.25/module.c
--- old/linuxrc-7.0.24/module.c 2021-01-13 17:35:16.000000000 +0100
+++ new/linuxrc-7.0.25/module.c 2021-01-19 11:15:46.000000000 +0100
@@ -1,3 +1,5 @@
+#define _GNU_SOURCE
+
 /*
  *
  * module.c      Load modules needed for installation
@@ -239,15 +241,24 @@
 
 module_t *mod_get_entry(char *name)
 {
-  module_t *ml;
+  module_t *ml, *mod_found = NULL;
 
   if(!name) return NULL;
 
+  /*
+   * A module might appear several times in config.module.list (because it's
+   * in different categories).
+   *
+   * Prefer to return an entry that's user-visible (has a 'descr' field).
+   */
   for(ml = config.module.list; ml; ml = ml->next) {
-    if(!mod_cmp(ml->name, name)) break;
+    if(!mod_cmp(ml->name, name)) {
+      mod_found = ml;
+      if(ml->descr) break;
+    }
   }
 
-  return ml;
+  return mod_found;
 }
 
 
@@ -322,7 +333,6 @@
   static module_t **mod_items = NULL;
   static int mods = 0;
   int i, width;
-  char buf[256];
 
   if(items) {
     for(i = 0; i < mods; i++) if(items[i]) free(items[i]);
@@ -348,12 +358,11 @@
 
   for(i = 0, ml = config.module.list; ml; ml = ml->next) {
     if(ml->type == type && ml->exists && ml->descr) {
-      sprintf(buf, "%*s%s%s",
+      asprintf(&items[i], "%*s%s%s",
         width,
         ml->name,
         *ml->descr ? ml->detected ? ml->active ? " * " : " + " : " : " : "", 
ml->descr
       );
-      items[i] = strdup(buf);
       mod_items[i++] = ml;
     }
   }
@@ -397,15 +406,28 @@
 
 void mod_menu()
 {
-  char *items[MAX_MODULE_TYPES + 3];
-  int i;
-  int again;
+  char *extra_items[] = {
+    "Show Loaded Modules",
+    "Unload Modules",
+    "Add Driver Update",
+    "Show Driver Updates"
+  };
+  char *items[MAX_MODULE_TYPES + sizeof extra_items / sizeof *extra_items];
+  int i, again;
 
   net_stop();
 
   do {
     mod_update_list();
 
+    /*
+     * Get list of actually present module types.
+     *
+     * Start with module type 1. 0 is reserved for 'autoload' and does not
+     * show up in this menu.
+     * This implies that this part of the list has max. MAX_MODULE_TYPES - 1
+     * entries.
+     */
     for(mod_types = 0, i = 1 /* 0 is reserved for 'autoload' */; i < 
MAX_MODULE_TYPES; i++) {
       if(mod_show_type(i)) {
         mod_type[mod_types] = i;
@@ -413,14 +435,11 @@
       }
     }
 
-    i = mod_types;
-
-    items[i++] = "Show Loaded Modules";
-    items[i++] = "Unload Modules";
-    items[i++] = "Add Driver Update";
-    items[i++] = "Show Driver Updates";
+    for (i = 0; i < sizeof extra_items / sizeof *extra_items; i++) {
+      items[mod_types + i] = extra_items[i];
+    }
 
-    items[i] = NULL;
+    items[mod_types + i] = NULL;
 
     again = dia_list("Kernel Modules (Hardware Drivers)", 40, mod_menu_cb, 
items, mod_menu_last, align_center);
 
@@ -648,24 +667,24 @@
     s = ml->param && (ml->autoload || ml->dontask) ? ml->param : "";
   }
 
-  if(show) {
-    if(s) {
-      sprintf(buf, "Trying to load module \"%s\"...\n\n"
-                   "During loading, you may want to watch the kernel messages 
on virtual console 4 (ALT-F4). Use ALT-F1 to switch back to this menu.",
-                   ml->name);
-      dia_info(&win, buf, MSGTYPE_INFO);
-      mod_insmod(ml->name, s);
-      win_close(&win);
-      i = mod_is_loaded(ml->name);
-      if(i) {
-        sprintf(buf, "Module \"%s\" loaded successfully.", ml->name);
-        dia_message(buf, MSGTYPE_INFO);
-      }
-      else {
-        util_beep(FALSE);
-        sprintf(buf, "Failed to load module \"%s\".", ml->name);
-        dia_message(buf, MSGTYPE_ERROR);
-      }
+  if(show && s) {
+    sprintf(buf,
+      "Trying to load module \"%s\"...\n\n"
+      "During loading, you may want to watch the kernel messages on virtual 
console 4 (ALT-F4). Use ALT-F1 to switch back to this menu.",
+      ml->name
+    );
+    dia_info(&win, buf, MSGTYPE_INFO);
+    mod_insmod(ml->name, s);
+    win_close(&win);
+    i = mod_is_loaded(ml->name);
+    if(i) {
+      sprintf(buf, "Module \"%s\" loaded successfully.", ml->name);
+      dia_message(buf, MSGTYPE_INFO);
+    }
+    else {
+      util_beep(FALSE);
+      sprintf(buf, "Failed to load module \"%s\".", ml->name);
+      dia_message(buf, MSGTYPE_ERROR);
     }
   }
   else {
@@ -972,6 +991,18 @@
   hd_free_hd_data(hd_data);
 
   free(hd_data);
-}
 
+  file_t *f, *f0 = file_read_file("/proc/modules", kf_none);
+
+  for(f = f0; f; f = f->next) {
+    module_t *mod;
+    for(mod = config.module.list; mod; mod = mod->next) {
+      if(!mod_cmp(mod->name, f->key_str)) {
+        mod->detected = mod->active = 1;
+      }
+    }
+  }
+
+  file_free_file(f0);
+}
 

Reply via email to