Lucene search

K
githubGitHub Advisory DatabaseGHSA-48M6-WM5P-RR6H
HistoryNov 14, 2023 - 6:32 p.m.

Insufficient covariance check makes self_cell unsound

2023-11-1418:32:20
GitHub Advisory Database
github.com
12
insufficient covariance check
self_cell
public versions
type dependent
trait object lifetimes
compile time error
software

7 High

AI Score

Confidence

Low

All public versions prior to 1.02 used an insufficient check to ensure that users correctly marked the dependent type as either covariant or not_covariant. This allowed users to mark a dependent as covariant even though its type was not covariant but invariant, for certain invariant types involving trait object lifetimes. One example for such a dependent type is type Dependent<'a> = RefCell<Box<dyn fmt::Display + 'a>>. Such a type allowed unsound usage in purely safe user code that leads to undefined behavior. The patched versions now produce a compile time error if such a type is marked as covariant.

Affected configurations

Vulners
Node
once_cell_projectonce_cellRange<1.0.2
OR
once_cell_projectonce_cellRange<0.10.3
CPENameOperatorVersion
self_celllt1.0.2
self_celllt0.10.3

7 High

AI Score

Confidence

Low