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

zfs/hkdf.c:81: possible wrong sized buffer ? #12130

Closed
dcb314 opened this issue May 27, 2021 · 2 comments · Fixed by #12237
Closed

zfs/hkdf.c:81: possible wrong sized buffer ? #12130

dcb314 opened this issue May 27, 2021 · 2 comments · Fixed by #12237
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@dcb314
Copy link

dcb314 commented May 27, 2021

In function ‘hkdf_sha512_expand’,
inlined from ‘hkdf_sha512’ at ../../module/zfs/hkdf.c:165:8:
../../module/zfs/hkdf.c:81:24: warning: ‘crypto_mech2id’ accessing 32 bytes in a region of size 16 [-Wstringop-overflow=]
81 | mech.cm_type = crypto_mech2id(SUN_CKM_SHA512_HMAC);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../module/zfs/hkdf.c: In function ‘hkdf_sha512’:
../../module/zfs/hkdf.c:81:24: note: referencing argument 1 of type ‘char *’

@dcb314 dcb314 added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels May 27, 2021
@dioni21
Copy link
Contributor

dioni21 commented Jun 3, 2021

What are your distro and gcc versions? Could be the same problem i had in #12188

@dcb314
Copy link
Author

dcb314 commented Jun 4, 2021

Fedora Linux and latest development gcc with flag -D_FORTIFY_SOURCE=2

AttilaFueloep added a commit to AttilaFueloep/zfs that referenced this issue Jun 13, 2021
@AttilaFueloep AttilaFueloep mentioned this issue Jun 13, 2021
13 tasks
AttilaFueloep added a commit to AttilaFueloep/zfs that referenced this issue Jun 23, 2021
Compiling with gcc 11.1.0 produces three new warnings.

Change the code slightly to avoid them.

Signed-off-by: Attila Fülöp <[email protected]>
Closes openzfs#12130
Closes openzfs#12188
mmaybee pushed a commit that referenced this issue Jun 23, 2021
Compiling with gcc 11.1.0 produces three new warnings.
Change the code slightly to avoid them.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes #12130
Closes #12188
Closes #12237
behlendorf pushed a commit that referenced this issue Jun 24, 2021
Compiling with gcc 11.1.0 produces three new warnings.
Change the code slightly to avoid them.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes #12130
Closes #12188
Closes #12237
rincebrain pushed a commit to rincebrain/zfs that referenced this issue Oct 23, 2021
Compiling with gcc 11.1.0 produces three new warnings.
Change the code slightly to avoid them.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes openzfs#12130
Closes openzfs#12188
Closes openzfs#12237
rincebrain pushed a commit to rincebrain/zfs that referenced this issue Oct 24, 2021
Compiling with gcc 11.1.0 produces three new warnings.
Change the code slightly to avoid them.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes openzfs#12130
Closes openzfs#12188
Closes openzfs#12237
tonyhutter pushed a commit that referenced this issue Nov 1, 2021
Compiling with gcc 11.1.0 produces three new warnings.
Change the code slightly to avoid them.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes #12130
Closes #12188
Closes #12237
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Nov 13, 2021
Compiling with gcc 11.1.0 produces three new warnings.
Change the code slightly to avoid them.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes openzfs#12130
Closes openzfs#12188
Closes openzfs#12237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants