func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int bnx2x_set_qm_cid_count(struct bnx2x *bp)
{
int cid_count = BNX2X_L2_MAX_CID(bp);
if (IS_SRIOV(bp))
cid_count += BNX2X_VF_CIDS;
if (CNIC_SUPPORT(bp))
cid_count += CNIC_CID_MAX;
return roundup(cid_count, QM_CID_ROUND);
} | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 177,104,880,583,252,900,000,000,000,000,000,000,000 | 12 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
void skb_tx_error(struct sk_buff *skb)
{
skb_zcopy_clear(skb, true);
} | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 295,568,634,572,039,100,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
#endif
static void dump_isom_obu(GF_ISOFile *file, GF_ISOTrackID trackID, FILE *dump, Bool dump_crc)
{
#ifndef GPAC_DISABLE_AV_PARSERS
u32 i, count, track, timescale;
AV1State av1;
ObuType obu_type;
u64 obu_size;
u32 hdr_size;
GF_BitStream *bs;
u32 idx;
track = gf_isom_get_track_by_id(file, trackID);
gf_av1... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 289ffce3e0d224d314f5f92a744d5fe35999f20b | 193,037,401,308,221,080,000,000,000,000,000,000,000 | 83 | fixed #1767 (fuzz) |
compile_length_quantifier_node(QuantNode* qn, regex_t* reg)
{
int len, mod_tlen;
int infinite = IS_INFINITE_REPEAT(qn->upper);
enum BodyEmptyType emptiness = qn->emptiness;
int tlen = compile_length_tree(NODE_QUANT_BODY(qn), reg);
if (tlen < 0) return tlen;
if (tlen == 0) return 0;
/* anychar repeat */
... | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 185,159,674,094,971,400,000,000,000,000,000,000,000 | 72 | #207: Out-of-bounds write |
TEST_F(QuicServerTransportTest, RecvRstStreamFrameNonexistServerStream) {
ShortHeader header(
ProtectionType::KeyPhaseZero,
*server->getConn().serverConnectionId,
clientNextAppDataPacketNum++);
RegularQuicPacketBuilder builder(
server->getConn().udpSendPacketLen,
std::move(header),
... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 225,331,591,700,595,240,000,000,000,000,000,000,000 | 18 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
port::Status CudnnSupport::DoPrepareForConvolution(
dnn::ConvolutionKind kind, dnn::DataType element_type, Stream* stream,
const dnn::BatchDescriptor& input_descriptor, DeviceMemoryBase input_data,
const dnn::FilterDescriptor& filter_descriptor,
DeviceMemoryBase filter_data, const dnn::BatchDescriptor& ... | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 259,436,918,292,725,230,000,000,000,000,000,000,000 | 54 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
static void rcc_pusharg(REgg *egg, char *str) {
REggEmit *e = egg->remit;
char buf[64], *p = r_egg_mkvar (egg, buf, str, 0);
if (!p) {
return;
}
R_FREE (egg->lang.ctxpush[CTX]);
egg->lang.ctxpush[CTX] = strdup (p); // INDEX IT WITH NARGS OR CONTEXT?!?
egg->lang.nargs++;
if (egg->lang.pushargs) {
e->push_arg... | 0 | [
"CWE-416"
] | radare2 | 93af319e0af787ede96537d46210369f5c24240c | 31,203,491,252,204,155,000,000,000,000,000,000,000 | 15 | Fix #14296 - Segfault in ragg2 (#14308) |
static void rfbSendSecurityType(rfbClientPtr cl, int securityType)
{
CARD32 value32;
value32 = Swap32IfLE(securityType);
if (WriteExact(cl, (char *)&value32, 4) < 0) {
rfbLogPerror("rfbSendSecurityType: write");
rfbCloseClient(cl);
return;
}
switch (securityType) {
case rfbSecTypeNone:
... | 0 | [
"CWE-787"
] | turbovnc | cea98166008301e614e0d36776bf9435a536136e | 13,360,795,937,572,477,000,000,000,000,000,000,000 | 25 | Server: Fix two issues identified by ASan
1. If the TLSPlain and X509Plain security types were both disabled, then
rfbOptPamAuth() would overflow the name field in the secTypes
structure when testing the "none" security type, since the name of
that security type has less than five characters. This issue was
... |
Tfloat cubic_atXY(const float fx, const float fy, const int z=0, const int c=0) const {
if (is_empty())
throw CImgInstanceException(_cimg_instance
"cubic_atXY(): Empty instance.",
cimg_instance);
return _cubic_atXY(fx,fy,z,c... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 122,666,290,560,444,300,000,000,000,000,000,000,000 | 7 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static JSValue js_bs_get_s16(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
s16 v;
GET_JSBS
if (!bs) return GF_JS_EXCEPTION(ctx);
v = (s16) gf_bs_read_u16(bs);
return JS_NewInt32(ctx, v );
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 103,090,203,553,036,490,000,000,000,000,000,000,000 | 8 | fixed #2138 |
static int __init sony_init(void)
{
dbg_hid("Sony:%s\n", __func__);
return hid_register_driver(&sony_driver);
} | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 207,817,131,021,981,000,000,000,000,000,000,000,000 | 6 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
void PM_io_parser<PMDEC>::print() const
{
out << "Plane_map_2" << std::endl;
out << "vertices " << vn << std::endl;
out << "halfedges " << en << std::endl;
out << "faces " << fn << std::endl;
if (verbose)
out << "/* index { isolated ? face : halfedge, mark, point } */"
<< std::endl;
Vertex_... | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 213,023,090,527,550,530,000,000,000,000,000,000,000 | 24 | Fix Nef_2 and Nef_S2 IO |
cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent)
{
cmsTagTypeSignature OriginalType;
cmsTagSignature tag16 = PCS2Device16[Intent];
cmsTagSignature tagFloat = PCS2DeviceFloat[Intent];
cmsContext ContextID = cmsGetProfileContextID(hProfile);
if (cmsIsTag(hProfile, tagFloat)) { ... | 1 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 148,647,231,114,394,800,000,000,000,000,000,000,000 | 65 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
static void cpu_device_release(struct device *dev)
{
/*
* This is an empty function to prevent the driver core from spitting a
* warning at us. Yes, I know this is directly opposite of what the
* documentation for the driver core and kobjects say, and the author
* of this code has already been publically ridi... | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 57,364,112,485,373,190,000,000,000,000,000,000,000 | 18 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
void zend_exception_set_previous(zval *exception, zval *add_previous TSRMLS_DC)
{
zval *previous;
if (exception == add_previous || !add_previous || !exception) {
return;
}
if (Z_TYPE_P(add_previous) != IS_OBJECT && !instanceof_function(Z_OBJCE_P(add_previous), default_exception_ce TSRMLS_CC)) {
zend_error(E_ER... | 0 | [] | php-src | a894a8155fab068d68a04bf181dbaddfa01ccbb0 | 159,666,285,129,417,510,000,000,000,000,000,000,000 | 21 | More fixes for bug #69152 |
PHP_FUNCTION(curl_errno)
{
zval *zid;
php_curl *ch;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
RETURN_LONG(ch->err.no);
} | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 36,183,512,430,081,037,000,000,000,000,000,000,000 | 13 | Fixed bug #68739 #68740 #68741 |
void netif_nit_deliver(struct sk_buff *skb)
{
struct packet_type *ptype;
if (list_empty(&ptype_all))
return;
skb_reset_network_header(skb);
skb_reset_transport_header(skb);
skb->mac_len = skb->network_header - skb->mac_header;
rcu_read_lock();
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype-... | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 43,764,122,415,080,850,000,000,000,000,000,000,000 | 18 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
xfs_icache_free_eofblocks(
struct xfs_mount *mp,
struct xfs_eofblocks *eofb)
{
return __xfs_icache_free_eofblocks(mp, eofb, xfs_inode_free_eofblocks,
XFS_ICI_EOFBLOCKS_TAG);
} | 0 | [
"CWE-476"
] | linux | afca6c5b2595fc44383919fba740c194b0b76aff | 279,024,671,834,882,400,000,000,000,000,000,000,000 | 7 | xfs: validate cached inodes are free when allocated
A recent fuzzed filesystem image cached random dcache corruption
when the reproducer was run. This often showed up as panics in
lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
BUG: unable to handle kernel NULL pointer dereference at 00000000000000... |
handle_t *jbd2__journal_start(journal_t *journal, int nblocks, int rsv_blocks,
gfp_t gfp_mask, unsigned int type,
unsigned int line_no)
{
handle_t *handle = journal_current_handle();
int err;
if (!journal)
return ERR_PTR(-EROFS);
if (handle) {
J_ASSERT(handle->h_transaction->t_journal == jou... | 0 | [
"CWE-787"
] | linux | e09463f220ca9a1a1ecfda84fcda658f99a1f12a | 145,039,795,803,421,200,000,000,000,000,000,000,000 | 47 | jbd2: don't mark block as modified if the handle is out of credits
Do not set the b_modified flag in block's journal head should not
until after we're sure that jbd2_journal_dirty_metadat() will not
abort with an error due to there not being enough space reserved in
the jbd2 handle.
Otherwise, future attempts to modi... |
caps_white_apply_cfg(rbtree_type* ntree, struct config_file* cfg)
{
struct config_strlist* p;
for(p=cfg->caps_whitelist; p; p=p->next) {
struct name_tree_node* n;
size_t len;
uint8_t* nm = sldns_str2wire_dname(p->str, &len);
if(!nm) {
log_err("could not parse %s", p->str);
return 0;
}
n = (struct na... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 11,649,527,569,658,715,000,000,000,000,000,000,000 | 31 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
TEST_P(DownstreamProtocolIntegrationTest, MissingHeadersLocalReplyWithBodyBytesCount) {
useAccessLog("%DOWNSTREAM_WIRE_BYTES_SENT% %DOWNSTREAM_WIRE_BYTES_RECEIVED% "
"%DOWNSTREAM_HEADER_BYTES_SENT% %DOWNSTREAM_HEADER_BYTES_RECEIVED%");
config_helper_.addFilter("{ name: invalid-header-filter, typed_co... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 262,559,394,624,861,430,000,000,000,000,000,000,000 | 24 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
unfade_idle (GSManager *manager)
{
gs_debug ("resetting fade");
gs_fade_reset (manager->priv->fade);
manager->priv->unfade_idle_id = 0;
return FALSE;
} | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 20,375,043,850,133,156,000,000,000,000,000,000,000 | 7 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key)
{
if (in == NULL || out == NULL || key == NULL) {
return BAD_FUNC_ARG;
}
return RsaSSL_VerifyInline_fips(in, inLen, out, key);
} | 0 | [
"CWE-310",
"CWE-787"
] | wolfssl | fb2288c46dd4c864b78f00a47a364b96a09a5c0f | 84,537,927,428,539,590,000,000,000,000,000,000,000 | 7 | RSA-PSS: Handle edge case with encoding message to hash
When the key is small relative to the digest (1024-bit key, 64-byte
hash, 61-byte salt length), the internal message to hash is larger than
the output size.
Allocate a buffer for the message when this happens. |
TEST_F(RouterTest, RequestWithUpstreamOverrideHost) {
NiceMock<Http::MockRequestEncoder> encoder_for_first_reqeust;
Http::ResponseDecoder* response_decoder = nullptr;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](Http::ResponseDecoder& decoder,
... | 0 | [
"CWE-703"
] | envoy | 5bf9b0f1e7f247a4eee7180849cb0823926f7fff | 154,104,267,858,749,700,000,000,000,000,000,000,000 | 71 | [1.21] CVE-2022-21655
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
int server_vacuum(Server *s, bool verbose) {
assert(s);
log_debug("Vacuuming...");
s->oldest_file_usec = 0;
if (s->system_journal)
do_vacuum(s, &s->system_storage, verbose);
if (s->runtime_journal)
do_vacuum(s, &s->runtime_storage, verbose);
... | 0 | [
"CWE-770"
] | systemd | 084eeb865ca63887098e0945fb4e93c852b91b0f | 124,322,187,122,267,820,000,000,000,000,000,000,000 | 14 | journald: do not store the iovec entry for process commandline on stack
This fixes a crash where we would read the commandline, whose length is under
control of the sending program, and then crash when trying to create a stack
allocation for it.
CVE-2018-16864
https://bugzilla.redhat.com/show_bug.cgi?id=1653855
The ... |
static inline double doSub(double x, double y) {
return x - y;
} | 0 | [
"CWE-670",
"CWE-703"
] | hermes | b2021df620824627f5a8c96615edbd1eb7fdddfc | 183,281,234,377,010,180,000,000,000,000,000,000,000 | 3 | Fix CVE-2020-1914 by using NEXTINST for SaveGeneratorLong
Summary:
If `SaveGeneratorLong` was emitted, it would accidentally jump to the
wrong next instruction, based on how long SaveGenerator was.
Make a callout function to handle the common case, and handle the dispatch
within each case of the interpreter loop.
Fi... |
void CLASS adobe_coeff(const char *t_make, const char *t_model
#ifdef LIBRAW_LIBRARY_BUILD
,
int internal_only
#endif
)
{
// clang-format off
static const struct
{
const char *prefix;
int t_black, t_maximum, trans[12];
} table[] = {
... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 145,557,204,475,459,860,000,000,000,000,000,000,000 | 1,292 | Secunia SA75000 advisory: several buffer overruns |
void vrend_renderer_create_sub_ctx(struct vrend_context *ctx, int sub_ctx_id)
{
struct vrend_sub_context *sub;
struct virgl_gl_ctx_param ctx_params;
GLuint i;
LIST_FOR_EACH_ENTRY(sub, &ctx->sub_ctxs, head) {
if (sub->sub_ctx_id == sub_ctx_id) {
return;
}
}
sub = CALLOC_STRUCT(vr... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 306,508,827,321,791,700,000,000,000,000,000,000,000 | 56 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
void ConnectionManagerImpl::ActiveStream::refreshCachedRoute() { refreshCachedRoute(nullptr); } | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 109,275,983,421,977,030,000,000,000,000,000,000,000 | 1 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static inline void xfrm_sk_free_policy(struct sock *sk) {} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 66,001,701,762,656,130,000,000,000,000,000,000,000 | 1 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
unsigned long lh_char_hash(const void *k)
{
static volatile int random_seed = -1;
if (random_seed == -1) {
int seed;
/* we can't use -1 as it is the unitialized sentinel */
while ((seed = json_c_get_random_seed()) == -1);
#if defined __GNUC__
__sync_val_compare_and_swap(&random_seed, -1, seed);
#elif defined... | 0 | [
"CWE-119",
"CWE-310"
] | json-c | 64e36901a0614bf64a19bc3396469c66dcd0b015 | 90,594,870,494,585,940,000,000,000,000,000,000,000 | 20 | Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int |
xfrm_policy_inexact_lookup_rcu(struct net *net, u8 type, u16 family,
u8 dir, u32 if_id)
{
struct xfrm_pol_inexact_key k = {
.family = family,
.type = type,
.dir = dir,
.if_id = if_id,
};
write_pnet(&k.net, net);
return rhashtable_lookup(&xfrm_policy_inexact_table, &k,
xfrm_pol_inexact_param... | 0 | [
"CWE-703"
] | linux | f85daf0e725358be78dfd208dea5fd665d8cb901 | 302,643,285,609,201,180,000,000,000,000,000,000,000 | 15 | xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of
pols[0]. This refcount can be dropped in xfrm_expand_policies() when
xfrm_expand_policies() return error. pols[0]'s refcount is balanced in
here. But xfrm_bundle_look... |
static void WriteTo8BimProfile(Image *image,const char *name,
const StringInfo *profile)
{
const unsigned char
*datum,
*q;
register const unsigned char
*p;
size_t
length;
StringInfo
*profile_8bim;
ssize_t
count;
unsigned char
length_byte;
unsigned int
value;
unsi... | 0 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 63,574,328,839,304,750,000,000,000,000,000,000,000 | 109 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
static void io_uring_clean_tctx(struct io_uring_task *tctx)
{
struct io_tctx_node *node;
unsigned long index;
xa_for_each(&tctx->xa, index, node)
io_uring_del_task_file(index);
if (tctx->io_wq) {
io_wq_put_and_exit(tctx->io_wq);
tctx->io_wq = NULL;
} | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 76,800,558,371,673,220,000,000,000,000,000,000,000 | 12 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
{
if (*p_cstr_index) {
j2k_destroy_cstr_index(*p_cstr_index);
(*p_cstr_index) = NULL;
}
} | 0 | [
"CWE-20"
] | openjpeg | 4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5 | 78,704,034,739,369,010,000,000,000,000,000,000,000 | 7 | Add support for generation of PLT markers in encoder
* -PLT switch added to opj_compress
* Add a opj_encoder_set_extra_options() function that
accepts a PLT=YES option, and could be expanded later
for other uses.
-------
Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2,
coming from S2A_MSIL1C_20... |
int ip_mc_join_group_ssm(struct sock *sk, struct ip_mreqn *imr,
unsigned int mode)
{
return __ip_mc_join_group(sk, imr, mode);
} | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 127,586,111,148,442,050,000,000,000,000,000,000,000 | 5 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
static int pivot_root(const char * new_root, const char * put_old)
{
#ifdef __NR_pivot_root
return syscall(__NR_pivot_root, new_root, put_old);
#else
errno = ENOSYS;
return -1;
#endif
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 328,020,383,759,684,200,000,000,000,000,000,000,000 | 9 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
GF_Err paen_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
FDPartitionEntryBox *ptr = (FDPartitionEntryBox *) s;
if (!s) return GF_BAD_PARAM;
if (ptr->blocks_and_symbols) {
e = gf_isom_box_write((GF_Box *)ptr->blocks_and_symbols, bs);
if (e) return e;
}
if (ptr->FEC_symbol_locations) {
e = gf_isom_box_writ... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 61,993,945,405,932,360,000,000,000,000,000,000,000 | 20 | fixed 2 possible heap overflows (inc. #1088) |
void i40e_fill_rss_lut(struct i40e_pf *pf, u8 *lut,
u16 rss_table_size, u16 rss_size)
{
u16 i;
for (i = 0; i < rss_table_size; i++)
lut[i] = i % rss_size;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 75,604,493,652,656,290,000,000,000,000,000,000,000 | 8 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
init_ipxsaparray(netdissect_options *ndo)
{
register int i;
register struct hnamemem *table;
for (i = 0; ipxsap_db[i].s != NULL; i++) {
int j = htons(ipxsap_db[i].v) & (HASHNAMESIZE-1);
table = &ipxsaptable[j];
while (table->name)
table = table->nxt;
table->name = ipxsap_db[i].s;
table->addr = htons(ip... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 730fc35968c5433b9e2a829779057f4f9495dc51 | 162,113,219,032,604,650,000,000,000,000,000,000,000 | 15 | CVE-2017-12894/In lookup_bytestring(), take the length of the byte string into account.
Otherwise, if, in our search of the hash table, we come across a byte
string that's shorter than the string we're looking for, we'll search
past the end of the string in the hash table.
This fixes a buffer over-read discovered by ... |
static int pipe_handler_request(struct sock *sk, u8 id, u8 code,
const void *data, int len)
{
struct pep_sock *pn = pep_sk(sk);
struct pnpipehdr *ph;
struct sk_buff *skb;
skb = pep_alloc_skb(sk, data, len, GFP_KERNEL);
if (!skb)
return -ENOMEM;
ph = pnp_hdr(skb);
ph->utid = id; /* whatever */
ph->messag... | 0 | [
"CWE-200"
] | net | bcd0f93353326954817a4f9fa55ec57fb38acbb0 | 265,719,610,421,548,600,000,000,000,000,000,000,000 | 18 | phonet: refcount leak in pep_sock_accep
sock_hold(sk) is invoked in pep_sock_accept(), but __sock_put(sk) is not
invoked in subsequent failure branches(pep_accept_conn() != 0).
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20211209082839.33985-1-hbh25y@gmail.com
Signed-off-by: Jakub Kic... |
parse_str_rsrc (SF_PRIVATE *psf, SD2_RSRC * rsrc)
{ char name [32], value [32] ;
int k, str_offset, rsrc_id, data_offset = 0, data_len = 0 ;
psf_log_printf (psf, "Finding parameters :\n") ;
str_offset = rsrc->string_offset ;
psf_log_printf (psf, " Offset RsrcId dlen slen Value\n") ;
for (k = 0 ; da... | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | dbe14f00030af5d3577f4cabbf9861db59e9c378 | 122,123,891,915,381,070,000,000,000,000,000,000,000 | 97 | src/sd2.c : Fix two potential buffer read overflows.
Closes: https://github.com/erikd/libsndfile/issues/93 |
void Item_copy_int::copy()
{
cached_value= item->val_int();
null_value=item->null_value;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 105,684,514,519,301,950,000,000,000,000,000,000,000 | 5 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static int mov_write_video_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
char compressor_name[32] = { 0 };
int avid = 0;
int uncompressed_ycbcr = ((track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_UYVY422)
... | 0 | [
"CWE-125"
] | FFmpeg | 95556e27e2c1d56d9e18f5db34d6f756f3011148 | 110,054,508,872,330,890,000,000,000,000,000,000,000 | 173 | avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample
Fixes: out of array read
Fixes: ffmpeg_crash_8.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static inline int get_cacheinfo_idx(enum cache_type type)
{
if (type == CACHE_TYPE_UNIFIED)
return 0;
return type;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 126,664,876,236,092,730,000,000,000,000,000,000,000 | 6 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
void h2_mplx_task_done(h2_mplx *m, h2_task *task, h2_task **ptask)
{
H2_MPLX_ENTER_ALWAYS(m);
task_done(m, task, NULL);
--m->tasks_active;
if (m->join_wait) {
apr_thread_cond_signal(m->join_wait);
}
if (ptask) {
/* caller wants another task */
*ptask = next_stream_t... | 0 | [
"CWE-444"
] | mod_h2 | 825de6a46027b2f4c30d7ff5a0c8b852d639c207 | 84,695,497,928,980,540,000,000,000,000,000,000,000 | 18 | * Fixed keepalives counter on slave connections. |
CImg<Tfloat> get_XYZtoxyY() const {
return CImg<Tfloat>(*this,false).XYZtoxyY();
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 182,299,167,688,917,100,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
wStream* rdp_send_stream_init(rdpRdp* rdp)
{
wStream* s = transport_send_stream_init(rdp->transport, 4096);
if (!s)
return NULL;
if (!Stream_SafeSeek(s, RDP_PACKET_HEADER_MAX_LENGTH))
goto fail;
if (!rdp_security_stream_init(rdp, s, FALSE))
goto fail;
return s;
fail:
Stream_Release(s);
return NULL;
} | 0 | [
"CWE-125"
] | FreeRDP | 9301bfe730c66180263248b74353daa99f5a969b | 202,259,613,773,235,500,000,000,000,000,000,000,000 | 18 | Fixed #6007: Boundary checks in rdp_read_flow_control_pdu |
static int encode_commit(struct xdr_stream *xdr, const struct nfs_writeargs *args)
{
__be32 *p;
RESERVE_SPACE(16);
WRITE32(OP_COMMIT);
WRITE64(args->offset);
WRITE32(args->count);
return 0;
} | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 301,705,304,128,334,440,000,000,000,000,000,000,000 | 11 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static int ISO8859_3ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_3);
} | 0 | [
"CWE-189"
] | libxml2 | 69f04562f75212bfcabecd190ea8b06ace28ece2 | 291,533,291,491,588,330,000,000,000,000,000,000,000 | 4 | Fix an off by one error in encoding
this off by one error doesn't seems to reproduce on linux
but the error is real. |
static void raw_cmd_free(struct floppy_raw_cmd **ptr)
{
struct floppy_raw_cmd *next;
struct floppy_raw_cmd *this;
this = *ptr;
*ptr = NULL;
while (this) {
if (this->buffer_length) {
fd_dma_mem_free((unsigned long)this->kernel_data,
this->buffer_length);
this->buffer_length = 0;
}
next = this->nex... | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 325,588,793,353,400,270,000,000,000,000,000,000,000 | 18 | floppy: ignore kernel-only members in FDRAWCMD ioctl input
Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: L... |
NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
{
char *resolved_name = NULL;
bool allow_symlinks = true;
bool allow_widelinks = false;
DBG_DEBUG("check_reduced_name [%s] [%s]\n", fname, conn->connectpath);
resolved_name = SMB_VFS_REALPATH(conn,fname);
if (!resolved_name) {
switch (er... | 1 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 165,069,281,562,321,460,000,000,000,000,000,000,000 | 139 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
static int parse_config(const char *var, const char *value, void *data)
{
struct parse_config_parameter *me = data;
struct submodule *submodule;
struct strbuf name = STRBUF_INIT, item = STRBUF_INIT;
int ret = 0;
/* this also ensures that we only parse submodule entries */
if (!name_and_item_from_var(var, &name, ... | 1 | [
"CWE-88"
] | git | 273c61496f88c6495b886acb1041fe57965151da | 298,785,321,032,645,040,000,000,000,000,000,000,000 | 99 | submodule-config: ban submodule paths that start with a dash
We recently banned submodule urls that look like
command-line options. This is the matching change to ban
leading-dash paths.
As with the urls, this should not break any use cases that
currently work. Even with our "--" separator passed to
git-clone, git-su... |
static void cmd_parse_enabled (IMAP_DATA* idata, const char* s)
{
dprint (2, (debugfile, "Handling ENABLED\n"));
while ((s = imap_next_word ((char*)s)) && *s != '\0')
{
if (ascii_strncasecmp(s, "UTF8=ACCEPT", 11) == 0 ||
ascii_strncasecmp(s, "UTF8=ONLY", 9) == 0)
idata->unicode = 1;
}
} | 0 | [
"CWE-78"
] | mutt | 185152818541f5cdc059cbff3f3e8b654fc27c1d | 271,516,175,167,422,970,000,000,000,000,000,000,000 | 11 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
co... |
static struct io_kiocb *io_get_req(struct io_ring_ctx *ctx,
struct io_submit_state *state)
{
gfp_t gfp = GFP_KERNEL | __GFP_NOWARN;
struct io_kiocb *req;
if (!state) {
req = kmem_cache_alloc(req_cachep, gfp);
if (unlikely(!req))
goto fallback;
} else if (!state->free_reqs) {
size_t sz;
int ret;
... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 196,948,782,056,188,430,000,000,000,000,000,000,000 | 51 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
ElectronBrowserHandlerImpl::ElectronBrowserHandlerImpl(
content::RenderFrameHost* frame_host,
mojo::PendingReceiver<mojom::ElectronBrowser> receiver)
: render_process_id_(frame_host->GetProcess()->GetID()),
render_frame_id_(frame_host->GetRoutingID()) {
content::WebContents* web_contents =
con... | 1 | [] | electron | 6b04cce91ad1563bd9555f2007a2ad5aa5487304 | 249,726,205,942,990,900,000,000,000,000,000,000,000 | 14 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367)
* Make ElectronBrowser mojo interface frame associated. (#32815)
Co-authored-by: Marek Haranczyk <marek@openfin.co>
* fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323) (#33350)
... |
int ssl2_part_read(SSL *s, unsigned long f, int i)
{
unsigned char *p;
int j;
if (i < 0)
{
/* ssl2_return_error(s); */
/* for non-blocking io,
* this is not necessarily fatal */
return(i);
}
else
{
s->init_num+=i;
/* Check for error. While there are recoverable errors,
* this function is n... | 0 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 122,395,880,411,272,740,000,000,000,000,000,000,000 | 38 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
virDomainSuspend(virDomainPtr domain)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(domain);
virResetLastError();
virCheckDomainReturn(domain, -1);
conn = domain->conn;
virCheckReadOnlyGoto(conn->flags, error);
if (conn->driver->domainSuspend) {
int ret;
ret = conn->driver->dom... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 239,521,169,283,568,900,000,000,000,000,000,000,000 | 27 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
R_IPI RBinFile *r_bin_file_xtr_load_buffer(RBin *bin, RBinXtrPlugin *xtr, const char *filename, RBuffer *buf, ut64 baseaddr, ut64 loadaddr, int idx, int fd, int rawstr) {
r_return_val_if_fail (bin && xtr && buf, NULL);
RBinFile *bf = r_bin_file_find_by_name (bin, filename);
if (!bf) {
bf = r_bin_file_new (bin, fi... | 0 | [
"CWE-125"
] | radare2 | 193f4fe01d7f626e2ea937450f2e0c4604420e9d | 52,533,007,471,995,630,000,000,000,000,000,000,000 | 37 | Fix integer overflow in string search causing oobread ##crash
* Reported by @greatergoodest via huntrdev
* BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04
* Reproducer bfileovf |
static bool fuse_writepage_need_send(struct fuse_conn *fc, struct page *page,
struct fuse_args_pages *ap,
struct fuse_fill_wb_data *data)
{
WARN_ON(!ap->num_pages);
/*
* Being under writeback is unlikely but possible. For example direct
* read to an mmaped fuse file will set the page dirty twi... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 322,600,943,223,765,040,000,000,000,000,000,000,000 | 33 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
ciEnv::~ciEnv() {
GUARDED_VM_ENTRY(
CompilerThread* current_thread = CompilerThread::current();
_factory->remove_symbols();
// Need safepoint to clear the env on the thread. RedefineClasses might
// be reading it.
current_thread->set_env(NULL);
)
} | 0 | [] | jdk17u | 8be0fc09f0ba2dd1dbfd6627456fa929d5574b04 | 47,609,147,283,917,130,000,000,000,000,000,000,000 | 9 | 8281859: Improve class compilation
Reviewed-by: mbaesken
Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f |
static int tfilter_notify(struct net *net, struct sk_buff *oskb,
struct nlmsghdr *n, struct tcf_proto *tp,
unsigned long fh, int event)
{
struct sk_buff *skb;
u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
if (!skb)
return -ENOBUFS;
if (tcf_fill_node(net... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 266,156,418,873,855,400,000,000,000,000,000,000,000 | 19 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
cssp_encode_tssmartcardcreds(char *username, char *password, char *domain)
{
STREAM out, h1, h2;
struct stream tmp = { 0 };
struct stream message = { 0 };
s_realloc(&tmp, 512 * 4);
// pin [0]
s_reset(&tmp);
out_utf16s(&tmp, password);
s_mark_end(&tmp);
h2 = ber_wrap_hdr_data(BER_TAG_OCTET_STRING, &tmp);
h1 ... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 169,330,290,434,364,020,000,000,000,000,000,000,000 | 70 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
GF_DOMHandler *gf_dom_listener_build(GF_Node *node, GF_EventType event_type, u32 event_parameter)
{
return gf_dom_listener_build_ex(node, event_type, event_parameter, NULL, NULL);
} | 0 | [
"CWE-416"
] | gpac | 9723dd0955894f2cb7be13b94cf7a47f2754b893 | 90,767,378,464,620,880,000,000,000,000,000,000,000 | 4 | fixed #2109 |
PHP_METHOD(PharFileInfo, hasMetadata)
{
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL(Z_TYPE(entry_obj->entry->metadata) != IS_UNDEF);
} | 0 | [
"CWE-20"
] | php-src | 1e9b175204e3286d64dfd6c9f09151c31b5e099a | 23,107,147,465,640,215,000,000,000,000,000,000,000 | 10 | Fix bug #71860: Require valid paths for phar filenames |
int remount_by_fd(int dst, unsigned long mountflags) {
char *proc;
if (asprintf(&proc, "/proc/self/fd/%d", dst) < 0)
errExit("asprintf");
int rv = mount(NULL, proc, NULL, mountflags|MS_BIND|MS_REMOUNT, NULL);
if (rv < 0 && arg_debug)
printf("Failed mount: %s\n", strerror(errno));
free(proc);
return rv;
} | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 240,280,836,724,448,850,000,000,000,000,000,000,000 | 12 | fixing CVE-2022-31214 |
TEST(QueryProjectionTest, IdSubfieldInclusionProjectionDoesNotPreserveId) {
auto proj = createProjection("{}", "{'_id.a': 1}");
ASSERT_FALSE(proj.isFieldRetainedExactly("b"));
ASSERT_FALSE(proj.isFieldRetainedExactly("_id"));
ASSERT_TRUE(proj.isFieldRetainedExactly("_id.a"));
ASSERT_FALSE(proj.isFie... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 12,323,901,961,475,060,000,000,000,000,000,000,000 | 7 | SERVER-53929 Add stricter parser checks around positional projection |
get_sw_value(buf_T *buf)
{
return get_sw_value_col(buf, 0);
} | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 113,925,155,591,971,120,000,000,000,000,000,000,000 | 4 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
int RGWDeleteObj_ObjStore_S3::get_params()
{
const char *if_unmod = s->info.env->get("HTTP_X_AMZ_DELETE_IF_UNMODIFIED_SINCE");
if (s->system_request) {
s->info.args.get_bool(RGW_SYS_PARAM_PREFIX "no-precondition-error", &no_precondition_error, false);
}
if (if_unmod) {
std::string if_unmod_decoded = u... | 0 | [
"CWE-79"
] | ceph | fce0b267446d6f3f631bb4680ebc3527bbbea002 | 34,246,097,919,216,275,000,000,000,000,000,000,000 | 27 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static int snd_ftu_create_mixer(struct usb_mixer_interface *mixer)
{
int err;
err = snd_ftu_create_volume_ctls(mixer);
if (err < 0)
return err;
err = snd_ftu_create_effect_switch(mixer, 1, 6);
if (err < 0)
return err;
err = snd_ftu_create_effect_volume_ctl(mixer);
if (err < 0)
return err;
err = snd_ft... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 254,152,366,243,794,200,000,000,000,000,000,000,000 | 34 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
static void php_binary_init(void)
{
char *binary_location;
#ifdef PHP_WIN32
binary_location = (char *)malloc(MAXPATHLEN);
if (GetModuleFileName(0, binary_location, MAXPATHLEN) == 0) {
free(binary_location);
PG(php_binary) = NULL;
}
#else
if (sapi_module.executable_location) {
binary_location = (char *)malloc... | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 63,119,453,743,976,360,000,000,000,000,000,000,000 | 48 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
void _TIFFsetString(char** cpp, char* cp)
{ setByteArray((void**) cpp, (void*) cp, strlen(cp)+1, 1); } | 0 | [
"CWE-20"
] | libtiff | 3144e57770c1e4d26520d8abee750f8ac8b75490 | 297,409,613,988,343,100,000,000,000,000,000,000,000 | 2 | * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings
of double to other data types to avoid undefined behaviour if the output range
isn't big enough to hold the input value.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643
http://bugzilla.maptools.org/show_bug.cgi?id=2642
http://bugzil... |
static int ext4_symlink(struct inode *dir,
struct dentry *dentry, const char *symname)
{
handle_t *handle;
struct inode *inode;
int l, err, retries = 0;
l = strlen(symname)+1;
if (l > dir->i_sb->s_blocksize)
return -ENAMETOOLONG;
retry:
handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
... | 0 | [
"CWE-20"
] | linux-2.6 | e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f | 285,959,431,841,467,600,000,000,000,000,000,000,000 | 57 | ext4: Add sanity check to make_indexed_dir
Make sure the rec_len field in the '..' entry is sane, lest we overrun
the directory block and cause a kernel oops on a purposefully
corrupted filesystem.
Thanks to Sami Liedes for reporting this bug.
http://bugzilla.kernel.org/show_bug.cgi?id=12430
Signed-off-by: "Theodor... |
static int fixup_bpf_calls(struct bpf_verifier_env *env)
{
struct bpf_prog *prog = env->prog;
bool expect_blinding = bpf_jit_blinding_enabled(prog);
struct bpf_insn *insn = prog->insnsi;
const struct bpf_func_proto *fn;
const int insn_cnt = prog->len;
const struct bpf_map_ops *ops;
struct bpf_insn_aux_data *aux;... | 0 | [] | linux | 294f2fc6da27620a506e6c050241655459ccd6bd | 19,070,982,047,136,991,000,000,000,000,000,000,000 | 348 | bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Currently, for all op verification we call __red_deduce_bounds() and
__red_bound_offset() but we only call __update_reg_bounds() in bitwise
ops. However, we could benefit from calling __update_reg_bounds() in
BPF_ADD, BPF_SUB, and BPF_MUL case... |
static int fts3DisconnectMethod(sqlite3_vtab *pVtab){
Fts3Table *p = (Fts3Table *)pVtab;
int i;
assert( p->nPendingData==0 );
assert( p->pSegments==0 );
/* Free any prepared statements held */
sqlite3_finalize(p->pSeekStmt);
for(i=0; i<SizeofArray(p->aStmt); i++){
sqlite3_finalize(p->aStmt[i]);
}
... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 259,191,847,439,265,160,000,000,000,000,000,000,000 | 24 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
static void do_signal(struct pt_regs *regs)
{
struct k_sigaction ka;
siginfo_t info;
sigset_t *oldset;
int signr;
/* we want the common case to go fast, which is why we may in certain
* cases get here from kernel mode */
if (!user_mode(regs))
return;
if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &c... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 14,772,733,180,272,074,000,000,000,000,000,000,000 | 59 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
void smb1cli_req_set_seqnum(struct tevent_req *req, uint32_t seqnum)
{
struct smbXcli_req_state *state =
tevent_req_data(req,
struct smbXcli_req_state);
state->smb1.seqnum = seqnum;
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 31,862,814,699,717,724,000,000,000,000,000,000,000 | 8 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
static void writexref(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, int from, int to, int first, int64_t main_xref_offset, int64_t startxref)
{
pdf_obj *trailer = NULL;
pdf_obj *obj;
pdf_obj *nobj = NULL;
fz_write_string(ctx, opts->out, "xref\n");
opts->first_xref_entry_offset = fz_tell_output(ctx, o... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 119,781,636,444,106,120,000,000,000,000,000,000,000 | 83 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
static int ath10k_usb_pm_resume(struct usb_interface *interface)
{
struct ath10k_usb *ar_usb = usb_get_intfdata(interface);
struct ath10k *ar = ar_usb->ar;
ath10k_usb_post_recv_transfers(ar,
&ar_usb->pipes[ATH10K_USB_PIPE_RX_DATA]);
return 0;
} | 0 | [
"CWE-476"
] | linux | bfd6e6e6c5d2ee43a3d9902b36e01fc7527ebb27 | 92,720,452,106,662,990,000,000,000,000,000,000,000 | 10 | ath10k: Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe
The `ar_usb` field of `ath10k_usb_pipe_usb_pipe` objects
are initialized to point to the containing `ath10k_usb` object
according to endpoint descriptors read from the device side, as shown
below in `ath10k_usb_setup_pipe_resources`:
for (i = 0; i < i... |
int ieee80211_radiotap_iterator_init(
struct ieee80211_radiotap_iterator *iterator,
struct ieee80211_radiotap_header *radiotap_header,
int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns)
{
/* check the radiotap header can actually be present */
if (max_length < sizeof(struct ieee80211_radiotap_... | 0 | [
"CWE-20",
"CWE-119"
] | linux | f5563318ff1bde15b10e736e97ffce13be08bc1a | 137,620,784,662,521,200,000,000,000,000,000,000,000 | 64 | wireless: radiotap: fix parsing buffer overrun
When parsing an invalid radiotap header, the parser can overrun
the buffer that is passed in because it doesn't correctly check
1) the minimum radiotap header size
2) the space for extended bitmaps
The first issue doesn't affect any in-kernel user as they all
check the... |
//! Fill sequentially all pixel values with specified values \overloading.
CImg<T>& fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
const T& val6) {
if (is_empty()) return *this;
T *ptrd, *ptre = end() - 6;
for (ptrd = _data; ptr... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 2,149,560,580,630,240,200,000,000,000,000,000,000 | 19 | Fix other issues in 'CImg<T>::load_bmp()'. |
void xt_table_unlock(struct xt_table *table)
{
mutex_unlock(&xt[table->af].mutex);
} | 0 | [
"CWE-119"
] | nf-next | d7591f0c41ce3e67600a982bab6989ef0f07b3ce | 61,642,332,384,118,670,000,000,000,000,000,000,000 | 4 | netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a
helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
static gboolean is_64bit_mode(struct mswsp_ct *ct, packet_info *pinfo, gboolean *result, void *private_data)
{
guint32 client_ver = 0;
guint32 server_ver = 0;
struct message_data *data = find_matching_request_by_fid(ct, pinfo, 0xC8,
TRUE, private_data);
if (data) {
client_ver = data->content.version;
da... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 248,239,097,039,701,300,000,000,000,000,000,000,000 | 17 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
static int vidioc_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{
struct raremono_device *radio = video_drvdata(file);
if (f->tuner != 0)
return -EINVAL;
f->type = V4L2_TUNER_RADIO;
f->frequency = radio->curfreq * 16;
return 0;
} | 0 | [
"CWE-416"
] | linux | c666355e60ddb4748ead3bdd983e3f7f2224aaf0 | 303,679,777,072,812,500,000,000,000,000,000,000,000 | 11 | media: radio-raremono: change devm_k*alloc to k*alloc
Change devm_k*alloc to k*alloc to manually allocate memory
The manual allocation and freeing of memory is necessary because when
the USB radio is disconnected, the memory associated with devm_k*alloc
is freed. Meaning if we still have unresolved references to the ... |
unsigned char const* qpdf_get_buffer(qpdf_data qpdf)
{
unsigned char const* result = 0;
qpdf_get_buffer_internal(qpdf);
if (qpdf->output_buffer)
{
result = qpdf->output_buffer->getBuffer();
}
return result;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 268,667,626,523,816,900,000,000,000,000,000,000,000 | 10 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int proc_cwd_link(struct inode *inode, struct path *path)
{
struct task_struct *task = get_proc_task(inode);
int result = -ENOENT;
if (task) {
result = get_fs_path(task, path, 0);
put_task_struct(task);
}
return result;
} | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 271,075,790,093,023,760,000,000,000,000,000,000,000 | 11 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
int sock_inuse_get(struct net *net)
{
int cpu, res = 0;
for_each_possible_cpu(cpu)
res += *per_cpu_ptr(net->core.sock_inuse, cpu);
return res;
} | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 79,950,614,493,684,400,000,000,000,000,000,000,000 | 9 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
static const char *cmd_pcre_match_limit(cmd_parms *cmd,
void *_dcfg, const char *p1)
{
long val;
if (cmd->server->is_virtual) {
return "ModSecurity: SecPcreMatchLimit not allowed in VirtualHost";
}
val = atol(p1);
if (val <= 0) {
return apr_psprintf(cmd->pool, "ModSecurity:... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 140,471,831,754,720,270,000,000,000,000,000,000,000 | 18 | Added SecXmlExternalEntity |
void PrintImportUsage()
{
u32 i;
gf_sys_format_help(helpout, help_flags, "# Importing Options\n"
"# File importing\n"
"Syntax is [-add]() / [-cat]() `URL[#FRAGMENT][:opt1...:optN=val]`\n"
"This process will create the destination file if not existing, and add the track(s) to it. If you wish to always create a ... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 334,527,908,117,171,700,000,000,000,000,000,000,000 | 64 | fixed #1734 |
int hclge_tm_schd_setup_hw(struct hclge_dev *hdev)
{
int ret;
/* Cfg tm mapping */
ret = hclge_tm_map_cfg(hdev);
if (ret)
return ret;
/* Cfg tm shaper */
ret = hclge_tm_shaper_cfg(hdev);
if (ret)
return ret;
/* Cfg dwrr */
ret = hclge_tm_dwrr_cfg(hdev);
if (ret)
return ret;
/* Cfg schd mode for ea... | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 178,595,108,637,983,840,000,000,000,000,000,000,000 | 22 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
static int protocol_client_init(VncState *vs, uint8_t *data, size_t len)
{
char buf[1024];
VncShareMode mode;
int size;
mode = data[0] ? VNC_SHARE_MODE_SHARED : VNC_SHARE_MODE_EXCLUSIVE;
switch (vs->vd->share_policy) {
case VNC_SHARE_POLICY_IGNORE:
/*
* Ignore the shared flag. ... | 0 | [
"CWE-772"
] | qemu | d3b0db6dfea6b3a9ee0d96aceb796bdcafa84314 | 329,441,032,943,283,940,000,000,000,000,000,000,000 | 96 | vnc: Set default kbd delay to 10ms
The current VNC default keyboard delay is 1ms. With that we're constantly
typing faster than the guest receives keyboard events from an XHCI attached
USB HID device.
The default keyboard delay time in the input layer however is 10ms. I don't know
how that number came to be, but empi... |
extern "C" void *__wrap__realloc_r(struct _reent *r, void *ptr, size_t size)
{
void *new_ptr = NULL;
#ifdef MBED_MEM_TRACING_ENABLED
mbed_mem_trace_lock();
#endif
#ifdef MBED_HEAP_STATS_ENABLED
// Implement realloc_r with malloc and free.
// The function realloc_r can't be used here directly since
/... | 0 | [
"CWE-190"
] | mbed-os | 151ebfcfc9f2383ee11ce3c771c3bf92900d6b43 | 292,463,538,778,404,560,000,000,000,000,000,000,000 | 42 | Add integer overflow check to the malloc wrappers
Add a check that the combined size of the buffer to allocate and
alloc_info_t does not exceed the maximum integer value representable
by size_t. |
ipmi_sdr_get_sensor_reading_ipmb(struct ipmi_intf *intf, uint8_t sensor,
uint8_t target, uint8_t lun, uint8_t channel)
{
struct ipmi_rq req;
struct ipmi_rs *rsp;
uint8_t bridged_request = 0;
uint32_t save_addr;
uint32_t save_channel;
if ( BRIDGE_TO_SENSOR(intf, target, channel) ) {
lprintf(LOG_DEBUG,
... | 0 | [
"CWE-120"
] | ipmitool | 7ccea283dd62a05a320c1921e3d8d71a87772637 | 318,954,655,884,522,000,000,000,000,000,000,000,000 | 35 | fru, sdr: Fix id_string buffer overflows
Final part of the fixes for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
9 variants of stack buffer overflow when parsing `id_string` field of
SDR records returned from `CMD_GET_SDR` command.
SDR record structs have an `id_co... |
static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this)
{
struct task_struct *new_owner;
struct futex_pi_state *pi_state = this->pi_state;
u32 curval, newval;
if (!pi_state)
return -EINVAL;
/*
* If current does not own the pi_state then the futex is
* inconsistent and user space fiddled... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7ada876a8703f23befbb20a7465a702ee39b1704 | 139,512,063,148,208,380,000,000,000,000,000,000,000 | 66 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... |
static inline signed int ReadPropertyMSBLong(const unsigned char **p,
size_t *length)
{
union
{
unsigned int
unsigned_value;
signed int
signed_value;
} quantum;
int
c;
register ssize_t
i;
unsigned char
buffer[4];
size_t
value;
if (*length < 4)
return(-1);
... | 1 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 269,377,153,204,201,000,000,000,000,000,000,000,000 | 39 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
static void virtio_scsi_bad_req(void)
{
error_report("wrong size for virtio-scsi headers");
exit(1);
} | 0 | [
"CWE-119"
] | qemu | 3c3ce981423e0d6c18af82ee62f1850c2cda5976 | 111,991,890,334,122,940,000,000,000,000,000,000,000 | 5 | virtio-scsi: fix buffer overrun on invalid state load
CVE-2013-4542
hw/scsi/scsi-bus.c invokes load_request.
virtio_scsi_load_request does:
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
this probably can make elem invalid, for example,
make in_num or out_num huge, then:
virtio_scsi_p... |
static u8 fm10k_tx_desc_flags(struct sk_buff *skb, u32 tx_flags)
{
/* set type for advanced descriptor with frame checksum insertion */
u32 desc_flags = 0;
/* set checksum offload bits */
desc_flags |= FM10K_SET_FLAG(tx_flags, FM10K_TX_FLAGS_CSUM,
FM10K_TXD_FLAG_CSUM);
return desc_flags;
} | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 243,021,529,645,410,960,000,000,000,000,000,000,000 | 11 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
static int is_string (const ut8 *buf, int size, int *len) {
int i;
if (size < 1) {
return 0;
}
if (size > 3 && buf[0] && !buf[1] && buf[2] && !buf[3]) {
*len = 1; // XXX: TODO: Measure wide string length
return 2; // is wide
}
for (i = 0; i < size; i++) {
if (!buf[i] && i > MINLEN) {
*len = i;
retur... | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 255,006,446,333,241,260,000,000,000,000,000,000,000 | 29 | Fix #16303 - c->table_query double free (#16318) |
INST_HANDLER (sleep) { // SLEEP
ESIL_A ("BREAK");
} | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 120,864,089,794,261,000,000,000,000,000,000,000,000 | 3 | Fix crash in anal.avr |
TEST_F(QuicServerTransportTest, TestRegisterAndHandleTransportKnobParams) {
int flag = 0;
server->registerKnobParamHandler(
199, [&](QuicServerConnectionState* /* server_conn */, uint64_t val) {
EXPECT_EQ(val, 10);
flag = 1;
});
server->registerKnobParamHandler(
200,
[&](Qu... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 249,687,746,804,660,380,000,000,000,000,000,000,000 | 32 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.