cdesktopenv/cde/programs
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
..
backdrops
dsdm
dtaction Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00
dtappbuilder
dtappintegrate dtappintegrate.src and dtopen.src: fix shellcheck warnings 2018-08-26 15:45:08 -06:00
dtcalc Remove legacysun code blocks 2019-10-14 15:54:33 -06:00
dtcm 'notdef' means it's not used, so we remove it 2019-10-15 20:32:13 -06:00
dtconfig
dtcreate Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00
dtdbcache
dtdocbook dtdocbook/instant: fix buffer overlow on German umlaut in latin-1 2019-11-30 10:13:43 -07:00
dtdspmsg
dtexec Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00
dtfile dtfile: Add scroll wheel support 2019-10-14 14:34:56 -06:00
dthello Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00
dthelp Use iconv on linux 2019-01-14 10:48:28 -07:00
dticon Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00
dtimsstart
dtinfo dtinfo: link proper localized (utf8) dirs 2019-11-17 15:07:14 -07:00
dtksh extra.h: remove unused prototypes 2019-12-15 14:07:52 -07:00
dtlogin 'notdef' means it's not used, so we remove it 2019-10-15 20:32:13 -06:00
dtmail dtmail: fix extra format args warnings 2019-10-15 21:22:11 -06:00
dtopen dtappintegrate.src and dtopen.src: fix shellcheck warnings 2018-08-26 15:45:08 -06:00
dtpad dtpad: emit error on catopen() failure 2019-10-14 14:42:21 -06:00
dtpdm
dtpdmd
dtprintegrate dtprintegrate: fix shellcheck warnings 2018-08-26 15:45:23 -06:00
dtprintinfo sym2num: don't hardcode path to cpp 2019-11-05 18:49:17 -07:00
dtscreen
dtsearchpath
dtsession dtsession, DtSvc: fix CVE-2020-2696/VU#308289 2020-01-13 19:13:23 -07:00
dtspcd
dtsr
dtstyle Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00
dtterm 'notdef' means it's not used, so we remove it 2019-10-15 20:32:13 -06:00
dtudcexch Refactor and reimplement dtudcfonted 2018-08-18 16:37:36 -06:00
dtudcfonted Merge /u/jrubio/cdesktopenv/ branch incompatible-pointer-types into master 2019-10-12 21:43:45 +00:00
dtwm Remove all optional compile flags from dtwm that are not referenced anywhere, and are unlikely to ever be used 2019-10-17 20:34:14 -06:00
fontaliases
icons Remove redundant motif widgets 2018-07-29 16:52:44 -06:00
localized Merge branch 'master' into utf8-conversion after 2.3.1 release 2019-11-16 16:34:48 -07:00
nsgmls Fix to Wenum-compare 2019-10-10 17:01:56 +02:00
palettes
ttsnoop Restore original `tail` functionality in ttsnoop, with POSIX args 2018-11-04 10:28:42 -07:00
tttypes
types Rename "dtapp" to "dtopen" 2018-07-19 20:42:54 -06:00
util
Imakefile Remove hpversion.h from repository 2018-10-06 17:00:38 -06:00