Skip to content

modesetting: add "CursorSize" option#19

Open
HaplessIdiot wants to merge 414 commits into
masterfrom
stefan11111-pr-1234
Open

modesetting: add "CursorSize" option#19
HaplessIdiot wants to merge 414 commits into
masterfrom
stefan11111-pr-1234

Conversation

@HaplessIdiot

Copy link
Copy Markdown
Contributor

On certain setups, it might still be useful to force a particular cursor
size via xorg.conf.
For example, if on a system the automatic probes fail, or if the user wants
a particular cursor size, that is higher that the minimum size.

Signed-off-by: stefan11111 stefan11111@shitposting.expert

mrg and others added 30 commits August 5, 2017 06:03
--
From 1b1d4c0 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nkidd@opentext.com>
Date: Sun, 21 Dec 2014 01:10:03 -0500
Subject: hw/xfree86: unvalidated lengths

This addresses:
CVE-2017-12180 in XFree86-VidModeExtension
CVE-2017-12181 in XFree86-DGA
CVE-2017-12182 in XFree86-DRI
--
From 211e05a Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb@suse.com>
Date: Fri, 7 Jul 2017 17:21:46 +0200
Subject: Xi: Test exact size of XIBarrierReleasePointer

Otherwise a client can send any value of num_barriers and cause reading or swapping of values on heap behind the receive buffer.
--
From 4ca68b8 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nkidd@opentext.com>
Date: Fri, 9 Jan 2015 10:09:14 -0500
Subject: dbe: Unvalidated variable-length request in ProcDbeGetVisualInfo
 (CVE-2017-12177)

v2: Protect against integer overflow (Alan Coopersmith)
--
From 55caa8b Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nkidd@opentext.com>
Date: Fri, 9 Jan 2015 11:43:05 -0500
Subject: xfixes: unvalidated lengths (CVE-2017-12183)

v2: Use before swap (Jeremy Huddleston Sequoia)

v3: Fix wrong XFixesCopyRegion checks (Alan Coopersmith)
--
From 859b08d Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nkidd@opentext.com>
Date: Wed, 24 Dec 2014 16:22:18 -0500
Subject: Xi: fix wrong extra length check in ProcXIChangeHierarchy
 (CVE-2017-12178)
--
From 9c23685 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb@suse.com>
Date: Fri, 7 Jul 2017 17:04:03 +0200
Subject: os: Make sure big requests have sufficient length.

A client can send a big request where the 32B "length" field has value
0. When the big request header is removed and the length corrected,
the value will underflow to 0xFFFFFFFF.  Functions processing the
request later will think that the client sent much more data and may
touch memory beyond the receive buffer.
--
From b747da5 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nkidd@opentext.com>
Date: Fri, 9 Jan 2015 10:15:46 -0500
Subject: Unvalidated extra length in ProcEstablishConnection (CVE-2017-12176)
- BlockHandler() timeout value changed from struct timeval ** to int **
  that has a millisecond value.

- avoid a NULL ptr deref in ProcXF86BigfontQueryFont() and make some
  code actually able to be run.
Undo diff to upstream.

There's a good chance we aren't using this code at all.
It was introduced as one of the patches fixing
https://bugs.freedesktop.org/show_bug.cgi?id=28181

This is marked fixed upstream, and was spotted on non-NetBSD, so it's
very likely to be unnecessary.

This diff was causing a double-free, causing Xorg to crash when closing
pkgsrc/emulators/{retroarch,nestopia}.
This is most likely a problem that became more evident from jemalloc
debug which is filling free'd memory with 0x5a5a5a...

Fixes PR xsrc/54246.
When uefi booting without driver-specific GPU support, wsfb is the only
choice for a graphical driver.

While here, combine the wsfb cases.
Not the best option without functional GLAMOR, but it does work.
…aki.

I've finally contacted with Yamasaki-san and he kindly answered
"no objection to change them to 2 clause license" in private mail.
Diffs to be committed have also been confirmed by him.
We appreciate all his contribution to early NetBSD/x68k.
https://mail-index.netbsd.org/source-changes/2020/07/18/msg119473.html
> Use AllocDevicePair() to initialize input devices in InitInput().

Untested, but I'll re-visit on migrating to HAVE_XORG_SERVER_VER=120.
HaplessIdiot and others added 20 commits March 13, 2026 14:47
…ring

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ngerous function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… cause overflow

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 1776: Use of potentially dangerous function
Potential fix for code scanning alert no. 32: Non-constant format string
They are now in the main files
Apply patches used by GitHub Actions
Potential fix for code scanning alert no. 139: Uncontrolled format string
Potential fix for code scanning alert no. 16: Static array access may cause overflow
Potential fix for code scanning alert no. 1461: Unbounded write
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 28: Potential use after free
On certain setups, it might still be useful to force a particular cursor
size via xorg.conf.
For example, if on a system the automatic probes fail, or if the user wants
a particular cursor size, that is higher that the minimum size.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@HaplessIdiot HaplessIdiot changed the title modesetting: add "CursorSize" option modesetting: add "CursorSize" option pr-1234 stefan11111 Mar 14, 2026
@HaplessIdiot HaplessIdiot changed the title modesetting: add "CursorSize" option pr-1234 stefan11111 modesetting: add "CursorSize" option Mar 14, 2026
Comment thread hw/xfree86/drivers/modesetting/driver.c Outdated
static void
ms_tearfree_do_flips(ScreenPtr pScreen)
{
#ifdef GLAMOR_HAS_GBM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like glamor dependency here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants