Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1592624 - (CVE-2018-12422) CVE-2018-12422 evolution-data-server: Unsafe use of strcat allows buffer overflow in addressbook/backends/ldap/e-book-backend-ldap.c
CVE-2018-12422 evolution-data-server: Unsafe use of strcat allows buffer over...
Status: CLOSED NOTABUG
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20180516,repor...
: Security
Depends On: 1592625 1592626
Blocks: 1592627
  Show dependency treegraph
 
Reported: 2018-06-18 21:17 EDT by Sam Fowler
Modified: 2018-07-17 04:46 EDT (History)
9 users (show)

See Also:
Fixed In Version: evolution-data-server 3.29.3
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-07-17 04:46:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Fowler 2018-06-18 21:17:33 EDT
Evolution-Data-Server in GNOME Evolution through 3.29.2 might allow attackers to trigger a stack-based buffer overflow in addressbook/backends/ldap/e-book-backend-ldap.c via a long query that is processed by the strcat function.


Upstream Bug:

https://bugzilla.gnome.org/show_bug.cgi?id=796174


Upstream Patch:

https://gitlab.gnome.org/GNOME/evolution-data-server/commit/34bad6173
Comment 1 Sam Fowler 2018-06-18 21:17:57 EDT
Created evolution-data-server tracking bugs for this issue:

Affects: fedora-all [bug 1592626]
Comment 3 Milan Crha 2018-06-19 03:12:25 EDT
(In reply to Sam Fowler from comment #0)
> Evolution-Data-Server in GNOME Evolution through 3.29.2 might allow
> attackers to trigger a stack-based buffer overflow in
> addressbook/backends/ldap/e-book-backend-ldap.c via a long query that is
> processed by the strcat function.

Well, the above is not true. I made the change in eds only to get rid of the strcat() calls there, but when you read the code carefully you'll realize it was perfectly fine. There could not happen any buffer overflow. Also, the buffer had been allocated on the heap, not on the stack.

This "issue" doesn't deserve CVE, from my point of view.
Comment 4 Sam Fowler 2018-06-19 03:32:36 EDT
(In reply to Milan Crha from comment #3)
> (In reply to Sam Fowler from comment #0)
> > Evolution-Data-Server in GNOME Evolution through 3.29.2 might allow
> > attackers to trigger a stack-based buffer overflow in
> > addressbook/backends/ldap/e-book-backend-ldap.c via a long query that is
> > processed by the strcat function.
> 
> Well, the above is not true. I made the change in eds only to get rid of the
> strcat() calls there, but when you read the code carefully you'll realize it
> was perfectly fine. There could not happen any buffer overflow. Also, the
> buffer had been allocated on the heap, not on the stack.
> 
> This "issue" doesn't deserve CVE, from my point of view.

This bug was filed due to the CVE publication by MITRE and based on the information in the upstream bug report:

https://nvd.nist.gov/vuln/detail/CVE-2018-12422


The CVE was not assigned by Red Hat, though it is our policy to file bugs for CVEs that affect our products. I would suggest filing a dispute against the CVE assignment via the MITRE cveform:

https://cveform.mitre.org/
Comment 5 Milan Crha 2018-06-19 04:09:04 EDT
Thanks for the pointers. I sent them a Rejection request. Let's wait for their response.
Comment 6 Milan Crha 2018-06-19 04:58:19 EDT
I cherry-picked the changes into the stable branches (gnome-3-28) upstream, thus they will be part of the 3.28.4 release. I still consider it not so useful, but to avoid issues at the last minute I made it anyway.
Comment 7 Riccardo Schirone 2018-07-11 05:52:01 EDT
I agree with mcrha that this does not seem like a real vulnerability, but more like a security hardening. The query seems correctly allocated with the right size and after a bit of playing with the function (thanks to mcrha help on this), I couldn't even send a very long string to this function that may cause an integer overflow when computing the buffer size.
Comment 8 Riccardo Schirone 2018-07-17 04:46:52 EDT
The CVE has been disputed by the maintainer. We are not going to treat this as a security vulnerability because even if strcat is used, the length of the destination string is precomputed and it is large enough.

Note You need to log in before you can comment on or make changes to this bug.