Skip to contentSkip to conversation

ioctl_console: Document new CAP_SYS_ADMIN restrictions (since Linux 6.7)

PATCH In review Günther Noack 3 participants 6 messages Dec 1, 2023 – Dec 21, 2023 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ioctl_console: Document new CAP_SYS_ADMIN restrictions (since Linux 6.7)

Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX' copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.

Cc Hanno Böck <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 man2/ioctl_console.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
man2/ioctl_console.2 +12 -0
index 684b4d013..abc50b786 100644
@@ -715,12 +715,20 @@ is 0 for character-by-character selection,
 or 2 for line-by-line selection.
 The indicated screen characters are highlighted and saved
 in a kernel buffer.
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_PASTESEL
 Paste selection.
 The characters in the selection buffer are
 written to
 .IR fd .
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_UNBLANKSCREEN
 Unblank the screen.
@@ -729,6 +737,10 @@ Unblank the screen.
 Sets contents of a 256-bit look up table defining characters in a "word",
 for word-by-word selection.
 (Since Linux 1.1.32.)
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_GETSHIFTSTATE
 .I argp
Signature · 1 line
2.43.0.rc2.451.g8631bc7472-goog
#1 lore raw

Hi Günther, Greg,

Quoted 16 lines · Günther Noack

Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX' copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.

Cc Hanno Böck <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 man2/ioctl_console.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
man2/ioctl_console.2 +0 -0
index 684b4d013..abc50b786 100644

man2/ioctl_console.2 is 0 for character-by-character selection, · line 719

Quoted 5 lines
man2/ioctl_console.2 +2 -0
@@ -715,12 +715,20 @@ is 0 for character-by-character selection,
 or 2 for line-by-line selection.
 The indicated screen characters are highlighted and saved
 in a kernel buffer.
+.IP
+Since Linux 6.7, using this subcode requires the

Are these requirements expected to be backported to stable kernels?

Cheers,
Alex

Quoted 29 lines
man2/ioctl_console.2 +10 -0
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_PASTESEL
 Paste selection.
 The characters in the selection buffer are
 written to
 .IR fd .
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_UNBLANKSCREEN
 Unblank the screen.
@@ -729,6 +737,10 @@ Unblank the screen.
 Sets contents of a 256-bit look up table defining characters in a "word",
 for word-by-word selection.
 (Since Linux 1.1.32.)
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_GETSHIFTSTATE
 .I argp
Signature · 1 line
2.43.0.rc2.451.g8631bc7472-goog
Signature · 1 line
<https://www.alejandro-colomar.es/>
#2 lore raw
Quoted 14 lines · Alejandro Colomar

Hi Günther, Greg,

Quoted 11 lines · Günther Noack

Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX' copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.

Cc Hanno Böck <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 man2/ioctl_console.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Quoted 12 lines

man2/ioctl_console.2 is 0 for character-by-character selection, · line 719

Quoted 10 lines
man2/ioctl_console.2 +2 -0
index 684b4d013..abc50b786 100644
@@ -715,12 +715,20 @@ is 0 for character-by-character selection,
 or 2 for line-by-line selection.
 The indicated screen characters are highlighted and saved
 in a kernel buffer.
+.IP
+Since Linux 6.7, using this subcode requires the

Are these requirements expected to be backported to stable kernels?

I don't think so, do you think they should be?

thanks,

greg k-h

#3 lore raw

Hi Greg,

Quoted 3 lines · Greg Kroah-Hartman
Quoted 1 line

Are these requirements expected to be backported to stable kernels?

I don't think so, do you think they should be?

I was asking just out of curiosity. Unless someone else speaks up, probably not.

Cheers,
Alex

Signature · 1 line
<https://www.alejandro-colomar.es/>
#4 lore raw
In reply to Greg Kroah-Hartman

Hello!

Quoted 26 lines · Greg Kroah-Hartman
Quoted 12 lines · Alejandro Colomar
Quoted 11 lines · Günther Noack

Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX' copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.

Cc Hanno Böck <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 man2/ioctl_console.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Quoted 12 lines

man2/ioctl_console.2 is 0 for character-by-character selection, · line 719

Quoted 10 lines
man2/ioctl_console.2 +2 -0
index 684b4d013..abc50b786 100644
@@ -715,12 +715,20 @@ is 0 for character-by-character selection,
 or 2 for line-by-line selection.
 The indicated screen characters are highlighted and saved
 in a kernel buffer.
+.IP
+Since Linux 6.7, using this subcode requires the

Are these requirements expected to be backported to stable kernels?

Quoted 1 line

I don't think so, do you think they should be?

Agreed, I think they don't need immediate backports either.

—Günther

#5 lore raw
In reply to Günther Noack

Hi Günther,

Quoted 1 line
Cc Alejandro Colomar <[email protected]>

I'm deprecating my gmail address; please use <[email protected]>.

Quoted 8 lines · Günther Noack

Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX' copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.

Cc Hanno Böck <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---

Patch applied; sorry for the delay. :)
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=846876d13a446836ca19ba1f619515a2cd992217>

Have a lovely day,
Alex

Quoted 42 lines
 man2/ioctl_console.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
man2/ioctl_console.2 +12 -0
index 684b4d013..abc50b786 100644
@@ -715,12 +715,20 @@ is 0 for character-by-character selection,
 or 2 for line-by-line selection.
 The indicated screen characters are highlighted and saved
 in a kernel buffer.
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_PASTESEL
 Paste selection.
 The characters in the selection buffer are
 written to
 .IR fd .
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_UNBLANKSCREEN
 Unblank the screen.
@@ -729,6 +737,10 @@ Unblank the screen.
 Sets contents of a 256-bit look up table defining characters in a "word",
 for word-by-word selection.
 (Since Linux 1.1.32.)
+.IP
+Since Linux 6.7, using this subcode requires the
+.B CAP_SYS_ADMIN
+capability.
 .TP
 .BR TIOCLINUX ", " subcode = TIOCL_GETSHIFTSTATE
 .I argp
Signature · 1 line
2.43.0.rc2.451.g8631bc7472-goog
Signature · 2 lines
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.