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

Don't leak packed recieved proprties #14197

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

brooksdavis
Copy link
Contributor

Motivation and Context

The recv implementation in libzfs packs up to two sets of properties to pass by ioctl, but only frees one. Found by inspection of fnvlist_packed() calls.

Description

Use a separate variable for each packed nvlist and free either if allocated.

How Has This Been Tested?

It's trivial and CI will run the test suite.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

When local properties (e.g., from -o and -x) are provided, don't leak
the packed representation of the recieved properties due to variable
reuse.

Signed-off-by: Brooks Davis <brooks.davis@sri.com>
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Nov 29, 2022
@behlendorf behlendorf merged commit d6df444 into openzfs:master Nov 29, 2022
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Nov 30, 2022
When local properties (e.g., from -o and -x) are provided, don't leak
the packed representation of the received properties due to variable
reuse.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Brooks Davis <brooks.davis@sri.com>
Closes openzfs#14197
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 1, 2022
When local properties (e.g., from -o and -x) are provided, don't leak
the packed representation of the received properties due to variable
reuse.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Brooks Davis <brooks.davis@sri.com>
Closes openzfs#14197
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Dec 16, 2022
When local properties (e.g., from -o and -x) are provided, don't leak
the packed representation of the received properties due to variable
reuse.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Brooks Davis <brooks.davis@sri.com>
Closes openzfs#14197
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Dec 17, 2022
When local properties (e.g., from -o and -x) are provided, don't leak
the packed representation of the received properties due to variable
reuse.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Brooks Davis <brooks.davis@sri.com>
Closes openzfs#14197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants