Page MenuHomeFreeBSD

ssh patch that originated from OpenSSH 7.5p1 update
Needs ReviewPublic

Authored by emaste on Feb 12 2021, 3:47 PM.
Tags
None
Referenced Files
F105936325: D28617.id83768.diff
Sun, Dec 22, 7:36 PM
Unknown Object (File)
Fri, Dec 13, 4:02 PM
Unknown Object (File)
Sun, Dec 8, 2:42 AM
Unknown Object (File)
Sun, Nov 24, 3:46 AM
Unknown Object (File)
Nov 20 2024, 9:01 AM
Unknown Object (File)
Oct 23 2024, 9:03 PM
Unknown Object (File)
Sep 29 2024, 1:44 AM
Unknown Object (File)
Sep 21 2024, 1:30 AM
Subscribers

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

While updating in-tree OpenSSH to 8.3p1 I came across this patch snippet, which originated in the referenced commit; this code has no other FreeBSD-specific changes prior to this.

I'm not sure of the reason for this change; there were no upstream changes in session.c between 7.4p1 and 7.5p1.

While pondering the leak introduced by the change I found that Coverity identified it (CID 1379281).

Oh,

Note that with all functions in this group, you should not call free(3)
on any pointers returned.  Memory allocated during retrieval or
processing of capability tags is automatically reused by subsequent calls
to functions in this group, or deallocated on calling login_close().
session.c
1278–1279

in base system now we've kept the const char *nl; but following upstream have dropped the free()