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

Disallow empty string as argument for --output-dir-flat and --output-dir-mirror #3220

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

embg
Copy link
Contributor

@embg embg commented Jul 29, 2022

Edit: commit e1873ad fixes the buffer underflow, but I realized there is a deeper issue here. The current behavior for --output-dir-flat="" and --output-dir-mirror="" maps "" -> "/". This is bad. Therefore, in f9f27de, I disallow empty string as an argument for those flags (and add a test verifying that behavior).

@embg embg changed the title Fix buffer underflow for null dir1 Fix buffer underflow for dir1 == "" Jul 29, 2022
@terrelln
Copy link
Contributor

Please add a test case to the cli-tests https://github.com/facebook/zstd/tree/dev/tests/cli-tests/basic

@terrelln
Copy link
Contributor

LGTM once you have a test case

@embg embg changed the title Fix buffer underflow for dir1 == "" Disallow empty string as argument for --output-dir-flat and --output-dir-mirror Jul 30, 2022
@embg
Copy link
Contributor Author

embg commented Jul 30, 2022

LGTM once you have a test case

Added a test and disallowed empty string as an argument for --output-dir-flat and --output-dir-mirror.

@embg embg merged commit 28ceb63 into facebook:dev Aug 1, 2022
@embg embg deleted the issue3200 branch August 1, 2022 18:05
@Cyan4973 Cyan4973 mentioned this pull request Feb 9, 2023
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 4, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: 2573beba23b0b7250e7280002029f6c34f6bd100)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 5, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: 2573beba23b0b7250e7280002029f6c34f6bd100)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 6, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: eb9c9818088105f9bf20b7fdc04a380ce488a5e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 6, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: eb9c9818088105f9bf20b7fdc04a380ce488a5e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 7, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: eb9c9818088105f9bf20b7fdc04a380ce488a5e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 8, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: eb9c9818088105f9bf20b7fdc04a380ce488a5e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Nov 11, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
halstead pushed a commit to yoctoproject/poky that referenced this pull request Nov 11, 2024
Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: eb9c9818088105f9bf20b7fdc04a380ce488a5e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/poky that referenced this pull request Nov 12, 2024
Source: poky
MR: 170427
Type: Integration
Disposition: Merged from poky
ChangeID: 2496178
Description:

Pick commits from [1] linked from [2] via [3].

[1] facebook/zstd#3220
[2] https://nvd.nist.gov/vuln/detail/CVE-2022-4899
[3] facebook/zstd#3200

(From OE-Core rev: eb9c9818088105f9bf20b7fdc04a380ce488a5e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buffer overrun can happen in util.c
3 participants