Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2007-4559 Patch #1

Open
wants to merge 1 commit into
base: 2.10.3
Choose a base branch
from

Conversation

TrellixVulnTeam
Copy link

Patching CVE-2007-4559

Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

DenisovAV pushed a commit to DenisovAV/flutter-tvos-dart that referenced this pull request Feb 4, 2024
This CL adds the token position of the checked parameter when doing the
AssertAssignable for better stacktraces when it fails.

E.g.

```
$ cat t.dart
class A {
  void takesA(A a) {
    print("Hello A");
  }
}
class B extends A {
  void takesA(covariant B b) {
    print("Hello B");
  }
}

void main() {
  A a = new A();
  A b = new B();
  b.takesA(b);
  b.takesA(a);
}
```

Before fix:

```
$ out/ReleaseX64/dart t.dart
Hello B
Unhandled exception:
type 'A' is not a subtype of type 'B' of 'b'
#0      B.takesA (file:///path/to/t.dart)
LibertyGlobal#1      main (file:///path/to/t.dart:16:5)
[...]
```

With fix:

```
$ out/ReleaseX64/dart t.dart
Hello B
Unhandled exception:
type 'A' is not a subtype of type 'B' of 'b'
#0      B.takesA (file:///path/to/t.dart:7:27)
LibertyGlobal#1      main (file:///path/to/t.dart:16:5)
[...]
```

TEST=runtime/tests/vm/dart/checked_parameter_assert_assignable_stacktrace_test.dart

Change-Id: I6409f6d9c41e9825391957f0df2b92b48ed0eb7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302203
Commit-Queue: Jens Johansen <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
DenisovAV pushed a commit to DenisovAV/flutter-tvos-dart that referenced this pull request May 5, 2024
…ertyGlobal#1.

Change-Id: Ib84e1aeef508cbfdd5b02d5c4c13420c5aa4daff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344421
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant