Thomas Frauendorfer | Miray Software 
							
						 
					 
					
						
						
						
						
							
						
						
							c652b0e86d 
							
						 
					 
					
						
						
							
							gfxmenu/gui: Check printf() format in the gui_progress_bar and gui_label  
						
						... 
						
						
						
						The gui_progress_bar and gui_label components can display the timeout
value. The format string can be set through a theme file. This patch
adds a validation step to the format string.
If a user loads a theme file into the GRUB without this patch then
a GUI label with the following settings
  + label {
  ...
  id = "__timeout__"
  text = "%s"
  }
will interpret the current timeout value as string pointer and print the
memory at that position on the screen. It is not desired behavior.
Signed-off-by: Thomas Frauendorfer | Miray Software <tf@miray.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Patch-Name: 2021-02-security/112-gfxmenu-gui-Check-printf-format-in-the-gui_progress_bar-and-gui_label.patch 
						
					 
					
						2021-02-27 15:02:08 +00:00 
						 
				 
			
				
					
						
							
							
								Vladimir Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							6866f2ba37 
							
						 
					 
					
						
						
							
							Remove potential division by 0 in gfxmenu.  
						
						
						
					 
					
						2015-01-21 17:42:15 +01:00 
						 
				 
			
				
					
						
							
							
								Vladimir Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							ae558c2ccf 
							
						 
					 
					
						
						
							
							Enable -Wformat=2 if it's supported.  
						
						
						
					 
					
						2013-12-21 15:28:28 +01:00 
						 
				 
			
				
					
						
							
							
								Vladimir Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							bcfa6d72e3 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c (draw_pixmap_bar): Avoid  
						
						... 
						
						
						
						division by-zero and senseless negative divisions. 
						
					 
					
						2013-11-08 15:38:58 +01:00 
						 
				 
			
				
					
						
							
							
								Vladimir Testov 
							
						 
					 
					
						
						
						
						
							
						
						
							47e0a61f6f 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c: Sanity checks added.  
						
						
						
					 
					
						2013-10-17 15:50:25 +04:00 
						 
				 
			
				
					
						
							
							
								Vladimir Testov 
							
						 
					 
					
						
						
						
						
							
						
						
							946fd07357 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c: New option `highlight_overlay`  
						
						... 
						
						
						
						* docs/gurb.texi: Likewise. 
						
					 
					
						2013-10-17 15:42:49 +04:00 
						 
				 
			
				
					
						
							
							
								Vladimir Testov 
							
						 
					 
					
						
						
						
						
							
						
						
							9c13c57623 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c (draw_pixmap_bar): Fixed bug.  
						
						... 
						
						
						
						Pixmap highlighted section with east and west slices was displayed
        incorrectly due to negative width of the central slice. 
						
					 
					
						2013-10-17 15:34:04 +04:00 
						 
				 
			
				
					
						
							
							
								Vladimir 'phcoder' Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							fc4c4fddf6 
							
						 
					 
					
						
						
							
							Detach optional parts of gfxterm and integrate in with coreboot init.  
						
						
						
					 
					
						2013-05-31 00:42:33 +02:00 
						 
				 
			
				
					
						
							
							
								Vladimir 'phcoder' Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							85002bf34a 
							
						 
					 
					
						
						
							
							Agglomerate more mallocs to speed-up gfxterm.  
						
						
						
					 
					
						2013-05-04 22:23:23 +02:00 
						 
				 
			
				
					
						
							
							
								Vladimir 'phcoder' Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							03f7c8c304 
							
						 
					 
					
						
						
							
							Fix several memory leaks.  
						
						
						
					 
					
						2013-05-04 13:47:10 +02:00 
						 
				 
			
				
					
						
							
							
								Vladimir Testov 
							
						 
					 
					
						
						
						
						
							
						
						
							07f392ebef 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c: Handle padding sizes.  
						
						
						
					 
					
						2013-04-03 09:34:08 +02:00 
						 
				 
			
				
					
						
							
							
								Vladimir 'phcoder' Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							14361ee8aa 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c (grub_gui_progress_bar): Remove  
						
						... 
						
						
						
						unused show_text member.
	* docs/grub.texi: Document "text" property. 
						
					 
					
						2012-03-10 19:46:46 +01:00 
						 
				 
			
				
					
						
							
							
								Vladimir 'phcoder' Serbinenko 
							
						 
					 
					
						
						
						
						
							
						
						
							1e3f8ae86f 
							
						 
					 
					
						
						
							
							* grub-core/gfxmenu/gui_progress_bar.c (progress_bar_set_property):  
						
						... 
						
						
						
						Put back accidently commented-out code. 
						
					 
					
						2012-02-24 22:40:05 +01:00 
						 
				 
			
				
					
						
							
							
								Colin Watson 
							
						 
					 
					
						
						
						
						
							
						
						
							52832c554c 
							
						 
					 
					
						
						
							
							Move gfxmenu color handling to video, so that gfxterm can use it  
						
						... 
						
						
						
						too.
* grub-core/gfxmenu/named_colors.c: Move to ...
* grub-core/video/colors.c: ... here.  Rename
grub_gui_get_named_color to grub_video_get_named_color.
* grub-core/gfxmenu/gui_string_util.c (my_isxdigit): Move to ...
* grub-core/video/colors.c (my_isxdigit): ... here.
* grub-core/gfxmenu/gui_string_util.c (parse_hex_color_component):
Move to ...
* grub-core/video/colors.c (parse_hex_color_component): ... here.
* grub-core/gfxmenu/gui_string_util.c (grub_gui_parse_color): Move
to ...
* grub-core/video/colors.c (grub_video_parse_color): ... here.
* include/grub/gui.h (grub_gui_color_t): Move to ...
* include/grub/video.h (grub_video_rgba_color_t): ... here.
* include/grub/gui.h (grub_gui_color_rgb): Move to ...
* include/grub/video.h (grub_video_rgba_color_rgb): ... here.
* include/grub/gui.h (grub_gui_map_color): Move to ...
* include/grub/video.h (grub_video_map_rgba_color): ... here.
* include/grub/gui_string_util.h (grub_gui_get_named_color): Move
to ...
* include/grub/video.h (grub_video_get_named_color): ... here.
* include/grub/gui_string_util.h (grub_gui_parse_color): Move to ...
* include/grub/video.h (grub_video_parse_color): ... here.
* grub-core/Makefile.core.def (kernel) [videoinkernel]: Add
video/colors.c.
(gfxmenu): Remove gfxmenu/named_colors.c.
(video_colors) [videomodules]: New module, containing
video/colors.c. 
						
					 
					
						2010-12-10 16:45:58 +00:00 
						 
				 
			
				
					
						
							
							
								BVK Chaitanya 
							
						 
					 
					
						
						
						
						
							
						
						
							692d7c2855 
							
						 
					 
					
						
						
							
							pull-in emu-lite branch  
						
						
						
					 
					
						2010-05-26 17:49:05 +05:30 
						 
				 
			
				
					
						
							
							
								BVK Chaitanya 
							
						 
					 
					
						
						
						
						
							
						
						
							8c41176882 
							
						 
					 
					
						
						
							
							automake commit without merge history  
						
						
						
					 
					
						2010-05-06 11:34:04 +05:30