Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • W weston
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 342
    • Issues 342
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • waylandwayland
  • weston
  • Issues
  • #26
Closed
Open
Issue created Jun 06, 2018 by Val Packett@valpackett🇦🇷Reporter

xwayland/wm: TYPE_WM_NORMAL_HINTS xcb value buffer overread when starting LibreOffice

Found by ASan (AddressSanitizer). I added a log statement:

--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -616,6 +616,11 @@ weston_wm_window_read_properties(struct weston_wm_window *window)
 				}
 			break;
 		case TYPE_WM_NORMAL_HINTS:
+			if (xcb_get_property_value_length(reply) < sizeof window->size_hints) {
+				weston_log("TYPE_WM_NORMAL_HINTS is too short: %d < %d\n",
+						xcb_get_property_value_length(reply), sizeof window->size_hints);
+				break;
+			};
 			memcpy(&window->size_hints,
 			       xcb_get_property_value(reply),
 			       sizeof window->size_hints);

Happens only when launching LibreOffice (built with GTK3) under Xwayland (GDK_BACKEND=x11 soffice):

[14:16:06.178] TYPE_WM_NORMAL_HINTS is too short: 60 < 72
[14:16:06.182] TYPE_WM_NORMAL_HINTS is too short: 60 < 72

Doesn't seem to cause any actual problems, but still weird...

P.S. looking forward to merge requests being enabled here :)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking