CVE Vulnerabilities

CVE-2012-2273

Improper Control of Generation of Code ('Code Injection')

Published: Apr 20, 2012 | Modified: Oct 30, 2018
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
4.9 MEDIUM
AV:L/AC:L/Au:N/C:N/I:N/A:C
RedHat/V2
RedHat/V3
Ubuntu

Comodo Internet Security before 5.10.228257.2253 on Windows 7 x64 allows local users to cause a denial of service (system crash) via a crafted 32-bit Portable Executable (PE) file with a kernel ImageBase value.

Weakness

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Affected Software

Name Vendor Start Version End Version
Comodo_internet_security Comodo * 5.9.221665.2197
Comodo_internet_security Comodo 3.0.14.276 3.0.14.276
Comodo_internet_security Comodo 3.0.15.277 3.0.15.277
Comodo_internet_security Comodo 3.0.16.295 3.0.16.295
Comodo_internet_security Comodo 3.0.17.304 3.0.17.304
Comodo_internet_security Comodo 3.0.18.309 3.0.18.309
Comodo_internet_security Comodo 3.0.19.318 3.0.19.318
Comodo_internet_security Comodo 3.0.20.320 3.0.20.320
Comodo_internet_security Comodo 3.0.22.349 3.0.22.349
Comodo_internet_security Comodo 3.0.23.364 3.0.23.364
Comodo_internet_security Comodo 3.0.24.368 3.0.24.368
Comodo_internet_security Comodo 3.0.25.378 3.0.25.378
Comodo_internet_security Comodo 3.5.53896.424 3.5.53896.424
Comodo_internet_security Comodo 3.5.54375.427 3.5.54375.427
Comodo_internet_security Comodo 3.5.55810.432 3.5.55810.432
Comodo_internet_security Comodo 3.5.57173.439 3.5.57173.439
Comodo_internet_security Comodo 3.8.64263.468 3.8.64263.468
Comodo_internet_security Comodo 3.8.64739.471 3.8.64739.471
Comodo_internet_security Comodo 3.8.65951.477 3.8.65951.477
Comodo_internet_security Comodo 3.9.95478.509 3.9.95478.509
Comodo_internet_security Comodo 3.10.102363.531 3.10.102363.531
Comodo_internet_security Comodo 3.11.108364.552 3.11.108364.552
Comodo_internet_security Comodo 3.12.111745.560 3.12.111745.560
Comodo_internet_security Comodo 3.13.121240.574 3.13.121240.574
Comodo_internet_security Comodo 3.13.125662.579 3.13.125662.579
Comodo_internet_security Comodo 3.14.130099.587 3.14.130099.587
Comodo_internet_security Comodo 4.0.138377.779 4.0.138377.779
Comodo_internet_security Comodo 4.0.141842.828 4.0.141842.828
Comodo_internet_security Comodo 4.1.150349.920 4.1.150349.920
Comodo_internet_security Comodo 5.0.163652.1142 5.0.163652.1142
Comodo_internet_security Comodo 5.3.174622.1216 5.3.174622.1216
Comodo_internet_security Comodo 5.3.175888.1227 5.3.175888.1227
Comodo_internet_security Comodo 5.3.176757.1236 5.3.176757.1236
Comodo_internet_security Comodo 5.3.181415.1237 5.3.181415.1237
Comodo_internet_security Comodo 5.4.189822.1355 5.4.189822.1355
Comodo_internet_security Comodo 5.5.195786.1383 5.5.195786.1383
Comodo_internet_security Comodo 5.8.211697.2124 5.8.211697.2124
Comodo_internet_security Comodo 5.8.213334.2131 5.8.213334.2131
Comodo_internet_security Comodo 5.9.219863.2196 5.9.219863.2196

Extended Description

When a product allows a user’s input to contain code syntax, it might be possible for an attacker to craft the code in such a way that it will alter the intended control flow of the product. Such an alteration could lead to arbitrary code execution. Injection problems encompass a wide variety of issues – all mitigated in very different ways. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common – i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.

Potential Mitigations

  • Run your code in a “jail” or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
  • Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
  • This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
  • Be careful to avoid CWE-243 and other weaknesses related to jails.
  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().

References