Commit Graph

78 Commits

Author SHA1 Message Date
Jon Trulson ece5c0ea14 Merge branch 'master' into autotools-conversion
Lost the ksh93 submodule so will re-add in a later commit.
2021-01-30 19:04:10 -07:00
Lev Kujawski 0e282a0ad7 On Linux, use the SVR4 (now POSIX) signal and locking interfaces instead of the non-standard BSD equivalents. 2021-01-10 18:08:00 -07:00
Jon Trulson a6e78364d0 Use bindir in install hooks rather than CDE_INSTALLATION_TOP
Patch supplied by Peter G.
2020-03-23 13:00:54 -06:00
Jon Trulson 11af2add7e Merge branch 'master' into autotools-conversion 2020-03-23 12:55:32 -06:00
Jon Trulson 15a2032626 Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
patch supplied from Peter G.
2020-03-23 12:51:18 -06:00
Jon Trulson 04b2d175aa SrvPalette.c: missed a merge conflict in SrvPalette.c 2020-01-26 12:22:09 -07:00
Jon Trulson 313b4a8e0b Merge branch 'master' into autotools-conversion 2020-01-26 12:17:44 -07:00
Jon Trulson 6b32246d06 dtsession, DtSvc: fix CVE-2020-2696/VU#308289
Marco Ivaldi <marco.ivaldi@mediaservice.net> has identified 3
vulnerabilities in CDE.

Two of them could affect our CDE (open-source version), while the 3rd
(sdtcm_convert) is Solaris specific.

The two vulnerabilities, both of which affect dtsession could allow a
local privilege escalation to root.  A POC exists for Solaris.  The
POC will not function on our CDE for two main reasons:

- the POC is Solaris specific
- The overflowed variables in question are allocated on the heap,
  whereas in Solaris these variables are located on the stack.

The first vulnerability allows an extra long palette name to be used
to cause a crash via insufficient validation in
SrvPalette.c:CheckMonitor().

The second, which has not yet been assigned a CERT CVE resides in
SmCreateDirs.c:_DtCreateDtDirs() in libDtSvc.  Due to insufficient
bounds checking, a crash or corruption can be achieved by using a very
long DISPLAY name.

This one is considered difficult to exploit, and no POC code is
available at this time.  CDE 2.x code-bases are also listed as not
vulnerable, however some work has been done anyway to do some proper
bounds checking in this function.

The following text portions are copied from the relevant advisories,
which have not been released as of this writing.

NOTE: Oracle CDE does NOT use CDE 2.3.0a or earlier as mentioned
below.  They are completely different code-bases):

Regarding CVE-2020-2692:

  A buffer overflow in the CheckMonitor() function in the Common
  Desktop Environment 2.3.0a and earlier, as distributed with Oracle
  Solaris 10 1/13 (Update 11) and earlier, allows local users to gain
  root privileges via a long palette name passed to dtsession in a
  malicious .Xdefaults file.

  Note that Oracle Solaris CDE is based on the original CDE 1.x train,
  which is different from the CDE 2.x codebase that was later open
  sourced. Most notably, the vulnerable buffer in the Oracle Solaris
  CDE is stack-based, while in the open source version it is
  heap-based.

Regarding the DtSvc bug, which does not currently have a CERT CVE:

  A difficult to exploit stack-based buffer overflow in the
  _DtCreateDtDirs() function in the Common Desktop Environment version
  distributed with Oracle Solaris 10 1/13 (Update 11) and earlier may
  allow local users to corrupt memory and potentially execute
  arbitrary code in order to escalate privileges via a long X11
  display name. The vulnerable function is located in the libDtSvc
  library and can be reached by executing the setuid program
  dtsession.

  The open source version of CDE (based on the CDE 2.x codebase) is
  not affected.
2020-01-13 19:13:23 -07:00
Jon Trulson 1aaf63f2a0 dtterm, dtsession, dtappgather, dtmail: set correct perms on make install 2020-01-05 20:53:03 -07:00
Jon Trulson 9b2534efab dtsession: do not hardcode -lcrypt on link 2019-12-14 19:14:52 -07:00
Jon Trulson 15dfdf231a dtsession/SrvPalette.c: delete trailing whitespace 2019-12-03 17:14:32 -07:00
Jon Trulson eb986d8018 dtsession/SrvPalette.c: fix bogus error handling when selection is lost 2019-12-03 17:10:35 -07:00
Jon Trulson 48dd0a54f3 dtlogin/dtsession: fix up some script perms, add proper OS defines 2019-12-03 14:06:18 -07:00
Jon Trulson 8c19b67032 dtsession: add missing dtsession_res script 2019-12-02 23:02:08 -07:00
Jon Trulson c329d5cfd7 Remove $(TIRPCINC) from all Makefile.am files - it no longer exists
Also, restructure some of the dependencies in the lib/tt binaries.  We
will link with libtt (which will include libtirpc as a dependency),
and XTOOLLIB - all the right X11 stuff without needing to add it to
every OS.  Removed several uneeded OS specializations ("if LINUX",
etc) as a result.
2019-11-20 18:52:29 -07:00
Jon Trulson 11eafe767b dtsession: make it build, add check for the full path to xrdb 2019-11-19 17:19:14 -07:00
chase dd68514e4f Remove hpversion.h from repository
This patch removes hpversion.h from the repository, this also untangles a
lot of ifdef mess. This closes bug CDExc19524.
2018-10-06 17:00:38 -06:00
chase 90a2b2848a remove ultrix support 2018-09-30 17:27:04 -06:00
Peter Howkins 94f78da5df dtsession: Change to ANSI function definitions 2018-06-28 04:18:25 +01:00
chase 6bf175ef2d Remove apollo support 2018-06-24 16:22:37 -06:00
Jon Trulson 20cad57cd4 dtsession: fix screen saver/locking on linux
The POSIX __linux__ commit broke the special detection on linux used
to determine whether a secure system was in use or not.

This commit reworks the logic a little bit to avoid special casing
linux in main().

It also reworks the logic in CanReAuthenticate() to fix up some issues
"fixed" to correct converity warnings.  The logic in this case was
mostly ok, but still didn't account for the proper usage of this
function.  Error detection improved somewhat as a result.
2018-05-31 22:23:19 -06:00
chase 809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
Ulrich Wilkens 885b65a09a Fixes for OpenBSD 2018-05-31 21:48:07 -06:00
chase 4f5e7fe5e3 Use POSIX macros for linux 2018-05-24 18:22:55 -06:00
chase 164e695cd0 remove OSF1 support 2018-05-24 14:25:26 -06:00
chase 07900bd93b Remove Unixware and openserver support 2018-05-20 12:13:07 -06:00
chase 8a4f389634 Remove UXPDS support 2018-05-15 20:27:22 -06:00
Peter Howkins f2c6a48d72 dtsession: A few extra snprintf's for buffer safety 2018-04-29 02:11:23 +01:00
chase 33d2749ea3 Last of the spelling fixed 2018-04-28 12:36:44 -06:00
chase 6d3a19d8f9 Even more spelling fixed 2018-04-28 12:36:33 -06:00
chase 1fe5a550b2 Fix typo in license headers 2018-04-28 12:30:20 -06:00
Jon Trulson 17101b6f4c Enable TIRPC support for Linux
This is enabled by default.  To disable, add:

in the config/cf/site.def or host.def file.

You will need to have the libtirpc-dev package installed.

The benefit is that you will no longer need to run rpcbind in insecure
mode (the -i option).  There are other benefits we may be able to take
advantage of in the future, like supporting IPV6 for ToolTalk.
2018-04-12 21:00:34 -06:00
Peter Howkins 637abd5d5c Resolve some coverity warnings 2018-03-08 23:03:21 +00:00
Peter Howkins 2ea057d511 Disable all code related to libXp
deprecated and mostly no longer included on current OSes
2016-04-20 20:17:22 +01:00
alx ed2c149bfc dtsession: Enable X11 screensaver extension on FreeBSD 2016-04-18 19:16:47 -06:00
alx cbd5abb33a dtsession: fixed errorlog rotation 2015-07-02 17:50:16 -06:00
Jon Trulson 4dae64c891 dtsession/SrvPalette: fix CID 89227 2014-12-27 20:09:09 -07:00
Jon Trulson 722cfc70eb dtsession/SrvFile_io: fix CID's 88299 and 89441 2014-12-27 20:06:53 -07:00
Jon Trulson aa2daba4af dtsession/SmUI: fix tainted var (CID 88216) 2014-12-27 19:52:37 -07:00
Jon Trulson db8280189d dtsession/SmSave: use absolute path to rm in system() 2014-12-27 19:42:21 -07:00
Jon Trulson e02c703af7 dtsession/SmSave: get rid of use of tempnam (CID 89359) 2014-12-27 19:33:03 -07:00
Jon Trulson 7c702bff6e dtsession/SmRestore: redo defaultCwd detection in StartClient() to be safer 2014-12-27 19:01:30 -07:00
Jon Trulson a657f302f7 dtsession/SmRestore: fixup 8 coverity issues. 2014-12-27 18:19:55 -07:00
Jon Trulson 65dcf12c82 dtsession/SmGlobals: re-add smGD.savePath to generated paths, was lost in mkstemp changes. 2014-12-27 17:50:28 -07:00
Jon Trulson 93783917ab dtsession/SmGlobals: unlink mkstemp generated files. 2014-12-27 17:24:04 -07:00
Jon Trulson 4b38955b01 dtsession/SmGlobals: use of tainted string (CID 89450) 2014-12-27 16:12:45 -07:00
Jon Trulson 1bde7d8c5c dtsession/SmLock: potential null deref (CID 87561, 87957, 88181) 2014-12-27 16:06:23 -07:00
Jon Trulson f14df58edb dtsession/SmDB: error handling issues (CID 87778, 87926) 2014-12-27 15:54:55 -07:00
Jon Trulson 1148ae8794 dtsession/SmCommun: fix bogus check (CID 89326) 2014-12-27 15:50:29 -07:00
Jon Trulson 881b0e1ed0 dtsession/SmGlobals: fixup 17 coverity issues. 2014-12-27 15:42:04 -07:00