Repository navigation
Conversation
Collaborator
|
Each commit requires a sign-off, as described in Submitting-patches.md. The sign-off needs to be from a human who takes responsibility for the content and can assert the right to submit the patches. |
Member
|
@jhanglim: Have you seen the @paulusmack comment? |
added 3 commits
November 22, 2026 09:17
pppoe_printpkt() walked the tags and (with pppoe-verbose 2) hex-dumped the payload up to the 16-bit length field of the received packet, while the packet structure holds 1508 payload bytes. receivePacket() dumps every packet before the callers compare the length field with the received byte count, so with "debug" a discovery frame whose length field is larger than the packet makes the dump read up to 64 KB past the stack buffer. Clamp the length to the payload size. waitForPADO() and waitForPADS() ignored the return value of receivePacket(); on a recv() error len was -1, which the unsigned comparison with HDR_SIZE accepted, and the stale buffer was parsed. Skip the iteration instead. The AC-Name tag is not NUL-terminated, so copying it with strlcpy() made strlen() read past the tag; copy len bytes and terminate. Signed-off-by: Seokwoo Jang <[email protected]>
lcp_reqci() only required an Authentication-Protocol option to be at least 4 bytes long and then read the CHAP algorithm byte, so a 4-byte CHAP option read one byte past the option (past inpacket_buf when the option ends a maximum-size packet). Reject an option without the algorithm byte, as CILEN_CHAP already says it must have one. Signed-off-by: Seokwoo Jang <[email protected]>
pr_log() computed the number of bytes left after the last newline, l, but copied n bytes, reading past the formatted text. The extra bytes were never printed because linep was set from l; copy l bytes. Signed-off-by: Seokwoo Jang <[email protected]>
jhanglim
force-pushed
the
aivuln-fixes
branch
from
November 22, 2026 00:17
92b1fa4 to
8cbdf70
Compare
Author
|
Hi Paul, sorry for the late reply — yes, I have seen it. I have added my Signed-off-by to each commit. Since the EAP-TLS and PEAP code is being reworked on the dev branch, I dropped those two commits from this PR. The remaining three (pppoe debug dump, LCP CHAP option length, pr_log) also apply cleanly to dev. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for the items in #663, found while reviewing pppd 2.5.5 (master 4dc474c) with an AI-assisted binary analysis tool and confirmed against the source; details, line numbers and conditions are in the issue.
pppd/EAP-TLS: free the session on init failure and zero it on creation— the session leaked on every EAP-TLS Start whose init failed (no EAP-TLS secret configured) or that followed an earlier Start;rtx_len/frag/offset/tlslenwere uninitialised and the retransmit path could run on a fresh session.pppd/PEAP: fail the authentication instead of dying, free the buffers— the twofatal()calls reachable from the peer (response larger than the peer's MRU, compound-MAC mismatch) now fail the authentication;peap_finish()freesin_buf/out_buf.plugins/pppoe: bound the debug dump by the payload size, check recv—pppoe_printpkt()no longer reads past the 1508-byte payload when the length field is larger;waitForPADO()/waitForPADS()skip a failedrecv(); the AC-Name copy no longer runsstrlen()on a tag that is not NUL-terminated.pppd: reject a CHAP Authentication-Protocol option shorter than 5 bytespppd: fix the length pr_log copies into its line bufferCompile-tested only: armhf, the Debian configure options (
--enable-cbcp --enable-multilink),-Wall; no new warnings in the changed files. Not run. Happy to split this into separate pull requests if you prefer.🤖 Generated with Claude Code