Commit Graph

103 Commits

Author SHA1 Message Date
Jon Trulson 5852c4742f Fix erroneous uses of ${prefix} rather than $(CDE_INSTALLATION_TOP)
Some Makefiles use prefix when they should be using
CDE_INSTALLATION_TOP.

Patch by Peter G.
2020-03-23 13:10:07 -06:00
Jon Trulson 313b4a8e0b Merge branch 'master' into autotools-conversion 2020-01-26 12:17:44 -07:00
Chase b46cfa7876 Remove redundant hourglass functions 2020-01-26 12:09:12 -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 ab023dfaed DtSvc: always use vsnprintf
There was code (_DtSimpleError() and _DtSimpleErrornoError()) that
only used snprintf when USE_SNPRINTF was defined, which it never was
of course.  We just remove the 2 checks and always use [v]snprintf.
2020-01-12 17:25:56 -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 0d70d8b120 Set version to 2.3.1a (devel) for current master 2019-11-18 13:03:52 -07:00
Jon Trulson 5fe7ee5b67 Change CDE version info for 2.3.1 release 2019-11-15 18:04:01 -07:00
Jon Trulson 3ce0527e52 DtSvc: vastly simplify building this library
We take advantage of subdir-object and just build the subdir source
files directly as normal dependencies of libDtSvc in the top level
Makefile.am.

This means the intevening subdirectory Makefiles are no longer needed,
and no need to replicate flags and the like between the
subdirectory Makefile.am files.

Also, no need to build fake .a libs we can't really use.

configure: remove AC_OUTPUT_FILES related the the lib/DtSvc/*
subdirectories.  They are no longer needed.
2019-10-29 19:17:52 -06:00
Jon Trulson d183ade8b3 DtSvc: we can't use archive .a libs in building libDtSvc.so
We were building subsets of this library as archive.a objects, then
trying to combine them into a shared object.  This warnings, and link
failures due to the lack of 0fPIC when building the archive libraries.

Now, we do not buld archive libraries, and the main libDtSvc.so
library is build by adding all of the .lo file in the component
subdirectories.

In a future commit, we could just remove the SUBDIR builds (DtUtil1,
etc) and build the sub objects directly.
2019-10-29 18:11:42 -06:00
Jon Trulson d7e5206d6b DtSvc/DtUtil2: fix implicit function declarations 2019-10-28 14:30:43 -06:00
Jon Trulson dbce2e4337 DtSvc/DtUtil1: fix implicit function declarations 2019-10-28 14:30:36 -06:00
Jon Trulson c0e3f08c9f DtSvc/DtUtil2: fix implicit function declarations 2019-10-28 13:27:47 -06:00
Jon Trulson 951ae0d327 DtSvc/DtUtil1: fix implicit function declarations 2019-10-28 13:22:09 -06:00
Jon Trulson 1079ffa240 configure: create some convenience AC_SUBST's for the global includes
Modify the various makefiles that were doing $(top_builddir)/include/Dt
to use them like @DT_INCDIR@, @TT_INCDIR@, etc...
2019-10-26 14:30:36 -06:00
Jon Trulson 43387e7368 libDtSvc: get it to build 2019-10-25 18:33:06 -06:00
Jon Trulson 0d78e17036 DtSvc,DtXinerama: More include fixes to deal with new order. 2019-10-25 18:06:54 -06:00
Jon Trulson 369308b737 The great includes migration of 2019 (autotools)
Ok - so one of the steps in building CDE is an early phase called the
includes phase (make includes).  At this point, all of the public
header files are exported to exports/include/Dt, DtI, ...

Then, the software is built using that include dir.

This of course does not work in autotools.  Much of the software does
things like #include <Dt/something.h>, so in order for the build to
succeed, this behavior must be represented/replicated in some way.

It seems the usual way of dealing with this is to place all public
headers (and in some projects, ALL headers) into a toplevel include
directory.

We now do this for all public headers - they have been moved from
wherever they were and placed in the appropriate spot in includes/

This will break the Imake 'make includes' phase unless the Imakefiles
are fixed (remove the HEADERS = stuff, and the incdir defines).  This
has not been done at this point since in reality, once autotools works
properly, there will be no need for the Imake stuff anymore, and I
intend to get rid of it.

This is just a warning for now - Imake builds in this tree will now
fail at the 'includes' stage.

This commit is only the migration.  In upcoming commits, libtt will be
fixed so that the hack being used before to get around this problem is
removed as there will no longer be any need.

And then the autotools work continues...
2019-10-25 17:01:34 -06:00
Jon Trulson db16ffd968 Fixup some more autogen wanrings. Only lib/tt/bin/shell remaining 2019-10-23 21:49:34 -06:00
Jon Trulson 1d7ed3a17e autotools: many fixups, SUN->SOLARIS, typos, etc
This should allow an autoregen and ./confiure to work.  We only
generate Makefiles for lib/* and ./Makefile for now.  We'll ad more as
we go along.

Make still fails as we need to figure out TT - tirpc lib, rpcgen,
etc.  But it's a start!
2019-10-23 17:34:55 -06:00
Chase b587eb7bf3 lib/DtSvc: add automake files 2019-10-23 15:34:19 -06:00
wmoxam de81a5b518 Remove ancient HP VUE compatibility support 2019-10-15 20:32:05 -06: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
Jon Trulson 6a72e2cea8 Change version to 2.3.0a (devel) 2018-09-20 16:49:01 -06:00
chase 5e96644596 DtsMM.c: Remove null in string 2018-08-26 15:44:47 -06:00
Jon Trulson 3d8e76a69f Merge branch 'master' into cde-next
Need to resync before folding current cde-next into master.
2018-07-06 13:19:33 -06:00
Jon Trulson cf86199b19 Stable release: 2.3.0 2018-07-06 12:05:20 -06:00
Jon Trulson 00aafb206e DtSvc/DtUtil2: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson f446ca54e9 DtSvc/DtUtil1: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson dbef83212a DtSvc/DtEncap: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 11ad65226d DtSvc/DtCodelibs: remove register keyword 2018-06-27 21:58:04 -06:00
Peter Howkins ba513278b9 libDtSvc: Change to ANSI function definitions 2018-06-28 03:58:49 +01:00
chase 6bf175ef2d Remove apollo support 2018-06-24 16:22:37 -06:00
Jon Trulson 825a504a11 XPM: Replace calls to XmeXpm*() with regular Xpm*()
This is no longer needed on modern Motif's.
2018-06-14 16:50:57 -06:00
Jon Trulson 0ec25848e9 cde: change version to 2.2.4a, for a development release 2018-06-08 13:03:39 -06:00
Jon Trulson a05ab67e12 XlationSvc: remove a "'" added in previous spelling commit that causes warnings 2018-05-31 22:23:19 -06:00
chase 809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
Ulrich Wilkens 297b6bd845 Fix warnings on FreeBSD 2018-05-31 22:04:08 -06:00
Ulrich Wilkens 07f272122d Fix Linux rpc problems with new glibc 2018-05-31 18:00:22 -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
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
chase 1817f335c6 Fix various spelling errors 2018-04-22 12:14:43 -06:00
Peter Howkins 691dffb076 lidtsvc: coverity fixes 2018-04-12 01:38:02 +01:00
Peter Howkins acc3d8868a libdtsvc: Resolve coverity warnings related to 'dereference before null check' related to free() 2018-04-02 22:10:46 +01:00