rtsp-auth: Fix NULL pointer dereference when handling an invalid basic Authorization header

When using the basic authentication scheme, we wouldn't validate that
the authorization field of the credentials is not NULL and pass it on
to g_hash_table_lookup(). g_str_hash() however is not NULL-safe and will
dereference the NULL pointer and crash.
A specially crafted (read: invalid) RTSP header can cause this to
happen.

As a solution, check for the authorization to be not NULL before
continuing processing it and if it is simply fail authentication.

This fixes CVE-2020-6095 and TALOS-2020-1018.

Discovered by Peter Wang of Cisco ASIG.
31 jobs for !111 with rtsp-auth-basic-crash in 76 minutes and 56 seconds (queued for 1 second)
detached
Status Job ID Name Coverage
  Preparation
passed #2021385
gst indent

00:00:31

passed #2021384
manifest

00:00:39

 
  Build
passed #2021395
gstreamer
build cerbero cross-android universal

00:11:29

passed #2021399
gst-ios-13.2
build cerbero cross-ios universal

00:19:39

passed #2021396
gstreamer
build cerbero cross win32

00:08:10

passed #2021397
gstreamer
build cerbero cross win64

00:06:55

passed #2021394
gstreamer
build cerbero fedora x86_64

00:04:02

passed #2021398
gst-macos-10.15
build cerbero macos x86_64

00:12:48

passed #2021390
build clang fedora x86_64

00:07:57

passed #2021386
build fedora x86_64

00:06:28

passed #2029437
docker windows 1809
build msys2

00:29:57

passed #2021387
build nodebug fedora x86_64

00:04:46

passed #2021388
build static fedora x86_64

00:12:34

passed #2021389
build static nodebug fedora x86_64

00:04:33

passed #2021391
docker windows 1809
build vs2017 amd64

00:13:12

passed #2021392
docker windows 1809
build vs2017 x86

00:12:44

failed #2021393
docker windows 1809
build msys2

01:59:49

canceled #2024725
docker windows 1809
build msys2

01:22:43

failed #2026469
docker windows 1809
build msys2

00:05:04

failed #2026796
docker windows 1809
build msys2

00:06:09

failed #2028289
docker windows 1809
build msys2

00:10:16

canceled #2029386
docker windows 1809
build msys2

 
  Test
passed #2021400
gstreamer
check fedora

00:04:08

passed #2021401
gstreamer
integration testsuites fedora 1/4

00:14:28

passed #2021402
gstreamer
integration testsuites fedora 2/4

00:17:11

passed #2021403
gstreamer
integration testsuites fedora 3/4

00:11:50

passed #2021862
gstreamer
integration testsuites fedora 4/4

00:15:29

failed #2021404
gstreamer
integration testsuites fedora 4/4

00:17:40

 
  Integrate
passed #2021405
cross-android universal examples

00:06:37

passed #2021407
gst-ios-13.2
cross-ios universal examples

00:03:30

passed #2021406
documentation

00:04:43