Skip to content

fuzz(css_lexer): ensure REPLACEMENT_CHARACTER is appended in small idents - #1213

Merged
keithamus merged 2 commits into
mainfrom
fuzz/findings-20260613-030547
Jun 13, 2026
Merged

fuzz(css_lexer): ensure REPLACEMENT_CHARACTER is appended in small idents#1213
keithamus merged 2 commits into
mainfrom
fuzz/findings-20260613-030547

Conversation

@keithamus

@keithamus keithamus commented Jun 13, 2026

Copy link
Copy Markdown
Member

Nightly fuzz run found new findings.

Given inputs like l\0000, the tokenizer would generate an ident with the value l, which would hit a debug_assert! during parse as the parsed string would be l\u{FFFD}.

This fixes this issue by ensuring the lexer adds REPLACEMENT_CHARACTER to small_ident, so that the ident value is consistently l\u{FFFD}.

GHA run: https://github.com/csskit/csskit/actions/runs/27454595586

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All CI jobs have passed. Approving. (Build jobs were skipped - no build-relevant files changed)

@keithamus keithamus changed the title fuzz: new parser findings 2026-06-13 fuzz(css_lexer): ensure REPLACEMENT_CHARACTER is appended in small idents Jun 13, 2026
@keithamus
keithamus enabled auto-merge (squash) June 13, 2026 08:08

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All CI jobs have passed. Approving.

@keithamus
keithamus merged commit e69c070 into main Jun 13, 2026
17 of 18 checks passed
@keithamus
keithamus deleted the fuzz/findings-20260613-030547 branch June 13, 2026 08:14
github-actions Bot pushed a commit that referenced this pull request Jun 13, 2026
## [0.0.25] - 2026-06-13

### Other Changes
- Update cargo deps (#1189) ([#1189](#1189))
- Push allocator-api2 back to 2.21 due to bumpalo (#1191) ([#1191](#1191))
- Fuzz: Try setting up a fuzzing suite (#1201) ([#1201](#1201))

### Css_ast
- css_ast: Avoid hanging on `={-->}` input. (#1183) ([#1183](#1183))
- Regenerate css_ast/src/values from csswg drafts (#1184) ([#1184](#1184))
- css_ast: Use assert_parse! closure macro variant in tests. (#1196) ([#1196](#1196))
- cssast/csskit_derives: Add new FeatureMetadata system (#1197) ([#1197](#1197))
- csskit_derives/css_ast: make derive(IntoCursor) work with generics (#1200) ([#1200](#1200))
- css_ast: Implement a NonEmpty generic (#1202) ([#1202](#1202))

### Css_lexer
- fuzz: early return atom functions when given non-atom tokens (#1206) ([#1206](#1206))
- fuzz(css_lexer): ensure REPLACEMENT_CHARACTER is appended in small idents (#1213) ([#1213](#1213))

### Css_parse
- css_parse: Ensure buffer is refilled if skipping past a whole buffer (#1180) ([#1180](#1180))
- css_parse: Impl ToSpan for Comparison (#1190) ([#1190](#1190))
- Impl Display for Comparison (#1193) ([#1193](#1193))
- css_parse: Improve assert_parse! macros to use a block/closure (#1194) ([#1194](#1194))

### Csskit
- csskit: improve json output for subcommands (#1182) ([#1182](#1182))
- chore(deps): update dependencies (patch) (#1185) ([#1185](#1185))

### Csskit_derives
- csskit_derives: Ensure generics expect Peek when using it. (#1198) ([#1198](#1198))

### Csskit_source_finder
- csskit_source_finder: Don't find visitable nodes that just visit children (#1199) ([#1199](#1199))

### Csskit_vscode
- chore(deps): update dependency @vscode/test-electron to v3 (#1192) ([#1192](#1192))
- fix(deps): update dependency esbuild to v0.28.1 [security] (#1210) ([#1210](#1210))

[forcebuild]
@keithamus keithamus mentioned this pull request Jun 13, 2026
github-actions Bot pushed a commit that referenced this pull request Jun 13, 2026
## [0.0.25] - 2026-06-13

### Other Changes
- Update cargo deps (#1189) ([#1189](#1189))
- Push allocator-api2 back to 2.21 due to bumpalo (#1191) ([#1191](#1191))
- Fuzz: Try setting up a fuzzing suite (#1201) ([#1201](#1201))

### Css_ast
- css_ast: Avoid hanging on `={-->}` input. (#1183) ([#1183](#1183))
- Regenerate css_ast/src/values from csswg drafts (#1184) ([#1184](#1184))
- css_ast: Use assert_parse! closure macro variant in tests. (#1196) ([#1196](#1196))
- cssast/csskit_derives: Add new FeatureMetadata system (#1197) ([#1197](#1197))
- csskit_derives/css_ast: make derive(IntoCursor) work with generics (#1200) ([#1200](#1200))
- css_ast: Implement a NonEmpty generic (#1202) ([#1202](#1202))

### Css_lexer
- fuzz: early return atom functions when given non-atom tokens (#1206) ([#1206](#1206))
- fuzz(css_lexer): ensure REPLACEMENT_CHARACTER is appended in small idents (#1213) ([#1213](#1213))

### Css_parse
- css_parse: Ensure buffer is refilled if skipping past a whole buffer (#1180) ([#1180](#1180))
- css_parse: Impl ToSpan for Comparison (#1190) ([#1190](#1190))
- Impl Display for Comparison (#1193) ([#1193](#1193))
- css_parse: Improve assert_parse! macros to use a block/closure (#1194) ([#1194](#1194))

### Csskit
- csskit: improve json output for subcommands (#1182) ([#1182](#1182))
- chore(deps): update dependencies (patch) (#1185) ([#1185](#1185))

### Csskit_derives
- csskit_derives: Ensure generics expect Peek when using it. (#1198) ([#1198](#1198))

### Csskit_source_finder
- csskit_source_finder: Don't find visitable nodes that just visit children (#1199) ([#1199](#1199))

### Csskit_vscode
- chore(deps): update dependency @vscode/test-electron to v3 (#1192) ([#1192](#1192))
- fix(deps): update dependency esbuild to v0.28.1 [security] (#1210) ([#1210](#1210))
keithamus added a commit that referenced this pull request Jun 13, 2026
## [0.0.25] - 2026-06-13

### Other Changes
- Update cargo deps (#1189)
([#1189](#1189))
- Push allocator-api2 back to 2.21 due to bumpalo (#1191)
([#1191](#1191))
- Fuzz: Try setting up a fuzzing suite (#1201)
([#1201](#1201))


### Css_ast
- css_ast: Avoid hanging on `={-->}` input. (#1183)
([#1183](#1183))
- Regenerate css_ast/src/values from csswg drafts (#1184)
([#1184](#1184))
- css_ast: Use assert_parse! closure macro variant in tests. (#1196)
([#1196](#1196))
- cssast/csskit_derives: Add new FeatureMetadata system (#1197)
([#1197](#1197))
- csskit_derives/css_ast: make derive(IntoCursor) work with generics
(#1200) ([#1200](#1200))
- css_ast: Implement a NonEmpty generic (#1202)
([#1202](#1202))


### Css_lexer
- fuzz: early return atom functions when given non-atom tokens (#1206)
([#1206](#1206))
- fuzz(css_lexer): ensure REPLACEMENT_CHARACTER is appended in small
idents (#1213) ([#1213](#1213))


### Css_parse
- css_parse: Ensure buffer is refilled if skipping past a whole buffer
(#1180) ([#1180](#1180))
- css_parse: Impl ToSpan for Comparison (#1190)
([#1190](#1190))
- Impl Display for Comparison (#1193)
([#1193](#1193))
- css_parse: Improve assert_parse! macros to use a block/closure (#1194)
([#1194](#1194))


### Csskit
- csskit: improve json output for subcommands (#1182)
([#1182](#1182))
- chore(deps): update dependencies (patch) (#1185)
([#1185](#1185))


### Csskit_derives
- csskit_derives: Ensure generics expect Peek when using it. (#1198)
([#1198](#1198))


### Csskit_source_finder
- csskit_source_finder: Don't find visitable nodes that just visit
children (#1199) ([#1199](#1199))


### Csskit_vscode
- chore(deps): update dependency @vscode/test-electron to v3 (#1192)
([#1192](#1192))
- fix(deps): update dependency esbuild to v0.28.1 [security] (#1210)
([#1210](#1210))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant