func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(Http1ServerConnectionImplTest, Http11AbsolutePath2) {
initialize();
TestRequestHeaderMapImpl expected_headers{
{":authority", "www.somewhere.com"}, {":path", "/foo/bar"}, {":method", "GET"}};
Buffer::OwnedImpl buffer("GET http://www.somewhere.com/foo/bar HTTP/1.1\r\nHost: bah\r\n\r\n");
expectHead... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 271,592,981,722,863,750,000,000,000,000,000,000,000 | 8 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
bool errorIsExpected() {
return _errorExpected;
} | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 303,776,714,208,999,140,000,000,000,000,000,000,000 | 3 | SERVER-50170 fix max staleness read preference parameter for server selection |
main(int argc, char** argv)
{
char * cmdname;
int rc;
Stonith * s;
const char * SwitchType = NULL;
const char * tmp;
const char * optfile = NULL;
const char * parameters = NULL;
int reset_type = ST_GENERIC_RESET;
int verbose = 0;
int status = 0;
int silent = 0;
int listhosts = 0;
int listtypes = 0;... | 1 | [
"CWE-287"
] | cluster-glue | 3d7b464439ee0271da76e0ee9480f3dc14005879 | 57,286,746,842,451,480,000,000,000,000,000,000,000 | 346 | Medium: stonith: add -E option to get the configuration from the environment |
static rsRetVal qDestructLinkedList(qqueue_t __attribute__((unused)) *pThis)
{
DEFiRet;
queueDrain(pThis); /* discard any remaining queue entries */
/* with the linked list type, there is nothing left to do here. The
* reason is that there are no dynamic elements for the list itself.
*/
RETiRet;
} | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 106,309,367,660,462,430,000,000,000,000,000,000,000 | 12 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
void mark_rect_as_modified(int x1, int y1, int x2, int y2, int force) {
if (damage_time != 0) {
/*
* This is not XDAMAGE, rather a hack for testing
* where we allow the framebuffer to be corrupted for
* damage_delay seconds.
*/
int debug = 0;
if (time(NULL) > damage_time + damage_delay) {
if (! q... | 0 | [
"CWE-862",
"CWE-284",
"CWE-732"
] | x11vnc | 69eeb9f7baa14ca03b16c9de821f9876def7a36a | 104,053,314,330,558,570,000,000,000,000,000,000,000 | 40 | scan: limit access to shared memory segments to current user |
static int packet_notifier(struct notifier_block *this,
unsigned long msg, void *ptr)
{
struct sock *sk;
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct net *net = dev_net(dev);
rcu_read_lock();
sk_for_each_rcu(sk, &net->packet.sklist) {
struct packet_sock *po = pkt_sk(sk);
switch (ms... | 0 | [
"CWE-119"
] | linux | 2b6867c2ce76c596676bec7d2d525af525fdc6e2 | 128,100,876,737,345,120,000,000,000,000,000,000,000 | 49 | net/packet: fix overflow in check for priv area size
Subtracting tp_sizeof_priv from tp_block_size and casting to int
to check whether one is less then the other doesn't always work
(both of them are unsigned ints).
Compare them as is instead.
Also cast tp_sizeof_priv to u64 before using BLK_PLUS_PRIV, as
it can ove... |
void read_pcm_samples_internal(thread_context* tctx, int x0, int y0, int log2CbSize,
int cIdx, bitreader& br)
{
const seq_parameter_set& sps = tctx->img->get_sps();
int nPcmBits;
int bitDepth;
int w = 1<<log2CbSize;
int h = 1<<log2CbSize;
if (cIdx>0) {
w /= sps.SubWidth... | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 198,584,477,935,115,060,000,000,000,000,000,000,000 | 45 | fix check for valid PPS idx (#298) |
plugin_prepare (struct backend *b, struct connection *conn, int readonly)
{
return 0;
} | 0 | [
"CWE-406"
] | nbdkit | a6b88b195a959b17524d1c8353fd425d4891dc5f | 114,645,694,507,081,080,000,000,000,000,000,000,000 | 4 | server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO
Most known NBD clients do not bother with NBD_OPT_INFO (except for
clients like 'qemu-nbd --list' that don't ever intend to connect), but
go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu
to add in an extra client step (whether info on the ... |
static inline unsigned int skb_end_offset(const struct sk_buff *skb)
{
return skb->end - skb->head; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 181,428,882,865,438,330,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... |
ecma_stringbuilder_create_raw (const lit_utf8_byte_t *data_p, /**< pointer to data */
const lit_utf8_size_t data_size) /**< size of the data */
{
const lit_utf8_size_t initial_size = data_size + ECMA_ASCII_STRING_HEADER_SIZE;
ecma_stringbuilder_header_t *header_p = (ecma_stringbuilde... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 70,775,172,430,250,640,000,000,000,000,000,000,000 | 16 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
_copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
{
AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
COPY_NODE_FIELD(cfgname);
COPY_NODE_FIELD(tokentype);
COPY_NODE_FIELD(dicts);
COPY_SCALAR_FIELD(override);
COPY_SCALAR_FIELD(replace);
COPY_SCALAR_FIELD(missing_ok);
re... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 82,070,752,374,716,860,000,000,000,000,000,000,000 | 13 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
correct_range(exarg_T *eap)
{
if (!(eap->argt & EX_ZEROR)) // zero in range not allowed
{
if (eap->line1 == 0)
eap->line1 = 1;
if (eap->line2 == 0)
eap->line2 = 1;
}
} | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 183,218,429,796,493,670,000,000,000,000,000,000,000 | 10 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
int sas_smp_get_phy_events(struct sas_phy *phy)
{
int res;
u8 *req;
u8 *resp;
struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
struct domain_device *dev = sas_find_dev_by_rphy(rphy);
req = alloc_smp_req(RPEL_REQ_SIZE);
if (!req)
return -ENOMEM;
resp = alloc_smp_resp(RPEL_RESP_SIZE);
if (!resp) {
kfr... | 1 | [
"CWE-399",
"CWE-772"
] | linux | 4a491b1ab11ca0556d2fda1ff1301e862a2d44c4 | 86,447,086,696,164,020,000,000,000,000,000,000,000 | 37 | scsi: libsas: fix memory leak in sas_smp_get_phy_events()
We've got a memory leak with the following producer:
while true;
do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null;
done
The buffer req is allocated and not freed after we return. Fix it.
Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
S... |
DEFUN (no_ip_community_list_name_standard_all,
no_ip_community_list_name_standard_all_cmd,
"no ip community-list standard WORD",
NO_STR
IP_STR
COMMUNITY_LIST_STR
"Add a standard community-list entry\n"
"Community list name\n")
{
return community_list_unset_vty (vty, ar... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 206,913,479,490,887,540,000,000,000,000,000,000,000 | 11 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
vmxnet3_get_next_head_rx_descr(VMXNET3State *s,
struct Vmxnet3_RxDesc *descr_buf,
uint32_t *descr_idx,
uint32_t *ridx)
{
for (;;) {
uint32_t ring_gen;
vmxnet3_read_next_rx_descr(s, RXQ_IDX, RX_HEAD_BODY_RING... | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 298,458,184,930,055,130,000,000,000,000,000,000,000 | 32 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
static MagickBooleanType WritePSDImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
const StringInfo
*icc_profile;
MagickBooleanType
status;
PSDInfo
psd_info;
register ssize_t
i;
size_t
length,
num_channels,
packet_size;
StringInfo
*bim_profile... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick | 8a43abefb38c5e29138e1c9c515b313363541c06 | 77,340,019,313,878,970,000,000,000,000,000,000,000 | 201 | https://github.com/ImageMagick/ImageMagick/issues/1451 |
static inline void kvm_apic_set_ldr(struct kvm_lapic *apic, u32 id)
{
kvm_lapic_set_reg(apic, APIC_LDR, id);
atomic_set_release(&apic->vcpu->kvm->arch.apic_map_dirty, DIRTY);
} | 0 | [
"CWE-703",
"CWE-459"
] | linux | f7d8a19f9a056a05c5c509fa65af472a322abfee | 120,656,151,573,630,760,000,000,000,000,000,000,000 | 5 | Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
Revert a change to open code bits of kvm_lapic_set_base() when emulating
APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base
and apic_hw_disabled being unsyncrhonized when the APIC is created. If
kvm_arch_vcpu_crea... |
chdlc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p)
{
register u_int length = h->len;
register u_int caplen = h->caplen;
if (caplen < CHDLC_HDRLEN) {
ND_PRINT((ndo, "[|chdlc]"));
return (caplen);
}
return (chdlc_print(ndo, p,length));
} | 1 | [
"CWE-125"
] | tcpdump | a1eefe986065846b6c69dbc09afd9fa1a02c4a3d | 324,855,004,130,558,770,000,000,000,000,000,000,000 | 11 | CVE-2017-13687/CHDLC: Improve bounds and length checks.
Prevent a possible buffer overread in chdlc_print() and replace the
custom check in chdlc_if_print() with a standard check in chdlc_print()
so that the latter certainly does not over-read even when reached via
juniper_chdlc_print(). Add length checks. |
static void vnc_led_state_change(VncState *vs)
{
int ledstate = 0;
if (!vnc_has_feature(vs, VNC_FEATURE_LED_STATE)) {
return;
}
ledstate = current_led_state(vs);
vnc_lock_output(vs);
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
vnc_write_u8(vs, 0);
vnc_write_u16(vs, 1);... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 135,058,461,606,436,680,000,000,000,000,000,000,000 | 18 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid,
nodemask_t *nmask, gfp_t gfp_mask)
{
spin_lock_irq(&hugetlb_lock);
if (h->free_huge_pages - h->resv_huge_pages > 0) {
struct page *page;
page = dequeue_huge_page_nodemask(h, gfp_mask, preferred_nid, nmask);
if (page) {
spin_unlock_... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 16,661,989,160,713,528,000,000,000,000,000,000,000 | 17 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
static void vnc_queue_clear(VncJobQueue *q)
{
qemu_cond_destroy(&queue->cond);
qemu_mutex_destroy(&queue->mutex);
buffer_free(&queue->buffer);
g_free(q);
queue = NULL; /* Unset global queue */
} | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 199,025,915,693,247,960,000,000,000,000,000,000,000 | 8 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
static int acp_sw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
if (adev->acp.cgs_device)
amdgpu_cgs_destroy_device(adev->acp.cgs_device);
return 0;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 57be09c6e8747bf48704136d9e3f92bfb93f5725 | 233,089,144,374,117,900,000,000,000,000,000,000,000 | 9 | drm/amdgpu: fix multiple memory leaks in acp_hw_init
In acp_hw_init there are some allocations that needs to be released in
case of failure:
1- adev->acp.acp_genpd should be released if any allocation attemp for
adev->acp.acp_cell, adev->acp.acp_res or i2s_pdata fails.
2- all of those allocations should be released i... |
xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID,
const xmlChar *SystemID) {
xmlDtdPtr ret = NULL;
xmlParserCtxtPtr ctxt;
xmlParserInputPtr input = NULL;
xmlCharEncoding enc;
xmlChar* systemIdCanonic;
if ((ExternalID == NULL) && (SystemID == NULL)) return... | 0 | [
"CWE-119"
] | libxml2 | 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d | 101,965,409,257,857,640,000,000,000,000,000,000,000 | 115 | Fix potential out of bound access |
connect_to_server_process (CamelIMAPXServer *is,
const gchar *cmd,
GError **error)
{
GSubprocessLauncher *launcher;
GSubprocess *subprocess = NULL;
CamelNetworkSettings *network_settings;
CamelProvider *provider;
CamelSettings *settings;
CamelIMAPXStore *store... | 0 | [] | evolution-data-server | f26a6f672096790d0bbd76903db4c9a2e44f116b | 69,323,131,382,849,290,000,000,000,000,000,000,000 | 156 | [IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failur... |
const char *get_ptr()
{
return m_ptr;
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 202,953,518,916,590,000,000,000,000,000,000,000,000 | 4 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert)
{
if (ri->type != CMS_RECIPINFO_TRANS) {
CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP,
CMS_R_NOT_KEY_TRANSPORT);
return -2;
}
return cms_SignerIdentifier_cert_cmp(ri->d.ktri->rid, cert);
} | 0 | [
"CWE-311",
"CWE-327"
] | openssl | 08229ad838c50f644d7e928e2eef147b4308ad64 | 264,985,807,931,027,000,000,000,000,000,000,000,000 | 9 | Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey
An attack is simple, if the first CMS_recipientInfo is valid but the
second CMS_recipientInfo is chosen ciphertext. If the second
recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
encryption key will be replaced by garbage, and the mess... |
_set_source_rsvg_linear_gradient (RsvgDrawingCtx * ctx,
RsvgLinearGradient * linear,
guint32 current_color_rgb, guint8 opacity, RsvgBbox bbox)
{
RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render);
cairo_t *cr = render->cr;
cairo_patt... | 0 | [] | librsvg | a51919f7e1ca9c535390a746fbf6e28c8402dc61 | 110,436,950,179,307,580,000,000,000,000,000,000,000 | 42 | rsvg: Add rsvg_acquire_node()
This function does proper recursion checks when looking up resources
from URLs and thereby helps avoiding infinite loops when cyclic
references span multiple types of elements. |
static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
{
switch (arg) {
case KVM_CAP_USER_MEMORY:
case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS:
case KVM_CAP_INTERNAL_ERROR_DATA:
#ifdef CONFIG_HAVE_KVM_MSI
case KVM_CAP_SIGNAL_MSI:
#endif
#ifdef CONFIG_HAVE_K... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 300,347,577,846,432,700,000,000,000,000,000,000,000 | 43 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
_outFieldStore(StringInfo str, const FieldStore *node)
{
WRITE_NODE_TYPE("FIELDSTORE");
WRITE_NODE_FIELD(arg);
WRITE_NODE_FIELD(newvals);
WRITE_NODE_FIELD(fieldnums);
WRITE_OID_FIELD(resulttype);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 249,649,693,376,432,100,000,000,000,000,000,000,000 | 9 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
text_fixup_invalid_utf8 (const gchar* text, gssize len, gsize *len_out)
{
static GIConv utf8_fixup_converter = NULL;
if (utf8_fixup_converter == NULL)
{
utf8_fixup_converter = g_iconv_open ("UTF-8", "UTF-8");
}
return text_convert_invalid (text, len, utf8_fixup_converter, unicode_fallback_string, len_out);
} | 0 | [
"CWE-22"
] | hexchat | 15600f405f2d5bda6ccf0dd73957395716e0d4d3 | 168,668,268,692,881,420,000,000,000,000,000,000,000 | 10 | Sanitize network name for scrollback files
This prevents using invalid chars on Windows or creating directories |
static inline int get_amv(Mpeg4DecContext *ctx, int n)
{
MpegEncContext *s = &ctx->m;
int x, y, mb_v, sum, dx, dy, shift;
int len = 1 << (s->f_code + 4);
const int a = s->sprite_warping_accuracy;
if (s->workaround_bugs & FF_BUG_AMV)
len >>= s->quarter_sample;
if (s->real_sprite_war... | 0 | [
"CWE-476"
] | FFmpeg | 2aa9047486dbff12d9e040f917e5f799ed2fd78b | 79,206,692,571,573,210,000,000,000,000,000,000,000 | 46 | avcodec/mpeg4videodec: Check read profile before setting it
Fixes: null pointer dereference
Fixes: ffmpeg_crash_7.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (__atomic_test_and_set(&seed_initialized, __ATOMIC_RELAXED) == 0) {
/* Do the seeding ourselves */
if (new_seed == 0)
new_seed = generate_seed();
_... | 0 | [
"CWE-310"
] | jansson | 42016a35c8907e477be73b0b5d06cc09af231ee4 | 222,471,687,701,434,730,000,000,000,000,000,000,000 | 20 | Oops, ATOMIC_ACQ_REL is not a correct memmodel for __atomic_store_n |
const char * util_acl_to_str(const sc_acl_entry_t *e)
{
static char line[80], buf[20];
unsigned int acl;
if (e == NULL)
return "N/A";
line[0] = 0;
while (e != NULL) {
acl = e->method;
switch (acl) {
case SC_AC_UNKNOWN:
return "N/A";
case SC_AC_NEVER:
return "NEVR";
case SC_AC_NONE:
return "N... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 183,348,996,025,025,830,000,000,000,000,000,000,000 | 61 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
QueueSetHandle_t xQueueCreateSet( const UBaseType_t uxEventQueueLength )
{
QueueSetHandle_t pxQueue;
pxQueue = xQueueGenericCreate( uxEventQueueLength, ( UBaseType_t ) sizeof( Queue_t * ), queueQUEUE_TYPE_SET );
return pxQueue;
}
| 0 | [
"CWE-200",
"CWE-190"
] | FreeRTOS-Kernel | 47338393f1f79558f6144213409f09f81d7c4837 | 199,240,148,745,815,560,000,000,000,000,000,000,000 | 8 | add assert for addition overflow on queue creation (#225) |
int get_ack(int fd, unsigned char *result_sha1)
{
static char line[1000];
int len = packet_read_line(fd, line, sizeof(line));
if (!len)
die("git fetch-pack: expected ACK/NAK, got EOF");
if (line[len-1] == '\n')
line[--len] = 0;
if (!strcmp(line, "NAK"))
return 0;
if (!prefixcmp(line, "ACK ")) {
if (!get_... | 0 | [] | git | 73bb33a94ec67a53e7d805b12ad9264fa25f4f8d | 301,191,694,673,456,000,000,000,000,000,000,000,000 | 20 | daemon: Strictly parse the "extra arg" part of the command
Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon")
git daemon enters an infinite loop and never terminates if a client
hides any extra arguments in the initial request line which is not
exactly "\0host=blah\0".
Since that change, a client m... |
void co64_del(GF_Box *s)
{
GF_ChunkLargeOffsetBox *ptr;
ptr = (GF_ChunkLargeOffsetBox *) s;
if (ptr == NULL) return;
if (ptr->offsets) gf_free(ptr->offsets);
gf_free(ptr);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 5,458,304,369,642,211,000,000,000,000,000,000,000 | 8 | prevent dref memleak on invalid input (#1183) |
void CMSEXPORT cmsStageFree(cmsStage* mpe)
{
if (mpe ->FreePtr)
mpe ->FreePtr(mpe);
_cmsFree(mpe ->ContextID, mpe);
} | 0 | [] | Little-CMS | b0d5ffd4ad91cf8683ee106f13742db3dc66599a | 78,341,597,295,107,240,000,000,000,000,000,000,000 | 7 | Memory Squeezing: LCMS2: CLUTElemDup
Check for allocation failures and tidy up if found. |
bool walk(Item_processor processor, bool walk_subquery, void *arg)
{
if (ref && *ref)
return (*ref)->walk(processor, walk_subquery, arg) ||
(this->*processor)(arg);
else
return FALSE;
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 330,453,402,430,927,500,000,000,000,000,000,000,000 | 8 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static uint dump_events_for_db(char *db)
{
char query_buff[QUERY_LENGTH];
char db_name_buff[NAME_LEN*2+3], name_buff[NAME_LEN*2+3];
char *event_name;
char delimiter[QUERY_LENGTH];
FILE *sql_file= md_result_file;
MYSQL_RES *event_res, *event_list_res;
MYSQL_ROW row, event_li... | 1 | [] | mysql-server | 6fa5e0814662d691be1a29bf88332348ec7c50c9 | 230,314,986,634,583,640,000,000,000,000,000,000,000 | 179 | Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERY
While writing comments if database object names has a new
line character, then next line is considered a command, rather
than a comment.
This patch fixes the way comments are constructed in mysqldump.
(cherry picked from commit 1099f9d17b1c697c2760f86556f5bae7d... |
static inline Quantum GetPixelY(const Image *restrict image,
const Quantum *restrict pixel)
{
return(pixel[image->channel_map[YPixelChannel].offset]);
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4 | 252,126,731,833,723,400,000,000,000,000,000,000,000 | 5 | |
int ssl3_send_next_proto(SSL *s)
{
unsigned int len, padding_len;
unsigned char *d;
if (s->state == SSL3_ST_CW_NEXT_PROTO_A)
{
len = s->next_proto_negotiated_len;
padding_len = 32 - ((len + 2) % 32);
d = (unsigned char *)s->init_buf->data;
d[4] = len;
memcpy(d + 5, s->next_proto_negotiated, len);
d[5... | 0 | [
"CWE-326",
"CWE-310"
] | openssl | bc8923b1ec9c467755cd86f7848c50ee8812e441 | 251,731,246,859,340,150,000,000,000,000,000,000,000 | 23 | Fix for CVE-2014-0224
Only accept change cipher spec when it is expected instead of at any
time. This prevents premature setting of session keys before the master
secret is determined which an attacker could use as a MITM attack.
Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue
and providing the ... |
void StreamListener::OnStreamAfterShutdown(ShutdownWrap* w, int status) {
CHECK_NOT_NULL(previous_listener_);
previous_listener_->OnStreamAfterShutdown(w, status);
} | 0 | [
"CWE-416"
] | node | 4f8772f9b731118628256189b73cd202149bbd97 | 256,683,240,211,235,570,000,000,000,000,000,000,000 | 4 | src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously
destroyed.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103
PR-URL: https://github.com/nodejs-private/... |
re_compile_fastmap (bufp)
struct re_pattern_buffer *bufp;
{
re_dfa_t *dfa = bufp->buffer;
char *fastmap = bufp->fastmap;
memset (fastmap, '\0', sizeof (char) * SBC_MAX);
re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);
if (dfa->init_state != dfa->init_state_word)
re_compile_fastmap_iter (buf... | 0 | [
"CWE-19"
] | gnulib | 5513b40999149090987a0341c018d05d3eea1272 | 183,881,159,499,837,950,000,000,000,000,000,000,000 | 17 | Diagnose ERE '()|\1'
Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative. This... |
qf_mark_adjust(
win_T *wp,
linenr_T line1,
linenr_T line2,
long amount,
long amount_after)
{
int i;
qfline_T *qfp;
int idx;
qf_info_T *qi = &ql_info;
int found_one = FALSE;
int buf_has_flag = wp == NULL ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
if (!(curbuf->b_has_qf_entry & buf_has_f... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 132,733,310,155,558,960,000,000,000,000,000,000,000 | 47 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
void Magick::Image::reduceNoise(void)
{
reduceNoise(3);
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 232,286,646,830,838,500,000,000,000,000,000,000,000 | 4 | Added missing return to avoid use after free. |
PJ_DEF(void) pj_scan_get_until( pj_scanner *scanner,
const pj_cis_t *spec, pj_str_t *out)
{
register char *s = scanner->curptr;
if (s >= scanner->end) {
pj_scan_syntax_err(scanner);
return;
}
while (PJ_SCAN_CHECK_EOF(s) && !pj_cis_match(spec, *s)) {
++s;
}
pj_strset3(out, scanner->curp... | 0 | [
"CWE-125"
] | pjproject | 077b465c33f0aec05a49cd2ca456f9a1b112e896 | 156,869,147,566,820,350,000,000,000,000,000,000,000 | 22 | Merge pull request from GHSA-7fw8-54cv-r7pm |
and_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc)
{
int r, not1, not2;
BBuf *buf1, *buf2, *pbuf;
BitSetRef bsr1, bsr2;
BitSet bs1, bs2;
not1 = IS_NCCLASS_NOT(dest);
bsr1 = dest->bs;
buf1 = dest->mbuf;
not2 = IS_NCCLASS_NOT(cc);
bsr2 = cc->bs;
buf2 = cc->mbuf;
if (not1 != 0) {
bi... | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 100,026,486,373,091,090,000,000,000,000,000,000,000 | 55 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
append_numopt(char *s, const char *opt, unsigned int num)
{
char buf[32];
snprintf(buf, sizeof(buf), "%u", num);
return append_opt(s, opt, buf);
} | 0 | [
"CWE-200"
] | util-linux | 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8 | 175,511,931,940,484,930,000,000,000,000,000,000,000 | 7 | mount: (deprecated) drop --guess-fstype
The option is undocumented and unnecessary.
Signed-off-by: Karel Zak <kzak@redhat.com> |
bool test_r_str_str_xy(void) {
char *canvas = "Hello World\n"
"This World is World\n"
"World is Hello\n";
int x = 0, y = 0;
const char *next = r_str_str_xy (canvas, "World", NULL, &x, &y);
mu_assert_eq (x, 6, "x of first occurrence");
mu_assert_eq (y, 0, "y of first occurrence");
next = r_str_str_xy (canvas, ... | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 44,713,157,025,423,490,000,000,000,000,000,000,000 | 21 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
skip_ipv6_digits(char *str)
{
while (isxdigit(*str) || *str == ':' || *str == '.') {
str++;
}
return str;
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 47,091,385,733,910,520,000,000,000,000,000,000,000 | 7 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
int __kvm_set_memory_region(struct kvm *kvm,
const struct kvm_userspace_memory_region *mem)
{
struct kvm_memory_slot old, new;
struct kvm_memory_slot *tmp;
enum kvm_mr_change change;
int as_id, id;
int r;
r = check_memory_region_flags(mem);
if (r)
return r;
as_id = mem->slot >> 16;
id = (u16)mem->sl... | 0 | [
"CWE-119"
] | linux | f8be156be163a052a067306417cd0ff679068c97 | 250,594,492,873,924,680,000,000,000,000,000,000,000 | 118 | KVM: do not allow mapping valid but non-reference-counted pages
It's possible to create a region which maps valid but non-refcounted
pages (e.g., tail pages of non-compound higher order allocations). These
host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family
of APIs, which take a reference to the p... |
dp_packet_get_rss_hash(const struct dp_packet *p)
{
return p->rss_hash;
} | 0 | [
"CWE-400"
] | ovs | 3512fb512c76a1f08eba4005aa2eb69160d0840e | 325,213,012,721,883,100,000,000,000,000,000,000,000 | 4 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
lyp_get_yang_data_template_name(const struct lyd_node *node)
{
struct lys_node *snode;
snode = lys_parent(node->schema);
while (snode && snode->nodetype & (LYS_USES | LYS_CASE | LYS_CHOICE)) {
snode = lys_parent(snode);
}
if (snode && snode->nodetype == LYS_EXT && strcmp(((struct lys_ext_i... | 0 | [
"CWE-787"
] | libyang | f6d684ade99dd37b21babaa8a856f64faa1e2e0d | 297,331,909,841,149,970,000,000,000,000,000,000,000 | 15 | parser BUGFIX long identity name buffer overflow
STRING_OVERFLOW (CWE-120) |
//! Display 1D graph in an interactive window \overloading.
const CImg<T>& display_graph(const char *const title=0,
const unsigned int plot_type=1, const unsigned int vertex_type=1,
const char *const labelx=0, const double xmin=0, const double xm... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 324,260,540,851,776,500,000,000,000,000,000,000,000 | 8 | . |
static NTSTATUS smb_set_file_unix_link(connection_struct *conn,
struct smb_request *req,
const char *pdata,
int total_data,
const struct smb_filename *smb_fname)
{
char *link_target = NULL;
const char *newname = smb_fname->base_name;
NTSTATUS status = NT_STATUS_OK;
TALLOC... | 1 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 50,610,553,973,009,060,000,000,000,000,000,000,000 | 74 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
void operator()(input_buffer* data) { total_ += data->get_remaining(); } | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 144,328,360,860,441,800,000,000,000,000,000,000,000 | 1 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
void handle_usb_rx(const void *msg, size_t len)
{
if (msg_tiny_flag) {
uint8_t buf[64];
memcpy(buf, msg, sizeof(buf));
uint16_t msgId = buf[4] | ((uint16_t)buf[3]) << 8;
uint32_t msgSize = buf[8] |
((uint32_t)buf[7]) << 8 |
((uint32_t)buf[6]) ... | 1 | [
"CWE-787"
] | keepkey-firmware | b222c66cdd7c3203d917c80ba615082d309d80c3 | 84,678,919,006,948,860,000,000,000,000,000,000,000 | 29 | board: factor out tiny_dispatch
And add stronger checks on what tiny_msg's are allowed to be decoded. |
guint32 menu_cache_app_get_show_flags( MenuCacheApp* app )
{
return app->show_in_flags;
} | 0 | [
"CWE-20"
] | menu-cache | 56f66684592abf257c4004e6e1fff041c64a12ce | 89,720,652,023,697,440,000,000,000,000,000,000,000 | 4 | Fix potential access violation, use runtime user dir instead of tmp dir.
Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0. |
mono_image_fill_export_table_from_module (MonoDomain *domain, MonoReflectionModule *module,
guint32 module_index, MonoDynamicImage *assembly)
{
MonoImage *image = module->image;
MonoTableInfo *t;
guint32 i;
t = &image->tables [MONO_TABLE_TYPEDEF];
for (i = 0; i < t->rows; ++i) {
MonoClass *klass = mono_class... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 165,524,815,172,040,380,000,000,000,000,000,000,000 | 16 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void Monitor::apply_quorum_to_compatset_features()
{
CompatSet new_features(features);
if (quorum_con_features & CEPH_FEATURE_OSD_ERASURE_CODES) {
new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_OSD_ERASURE_CODES);
}
if (quorum_con_features & CEPH_FEATURE_OSDMAP_ENC) {
new_features.incompat.inser... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 154,484,222,361,706,780,000,000,000,000,000,000,000 | 18 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static void charstring_end(void)
{
byte *bp;
sprintf(line, "%d ", (int) (charstring_bp - charstring_buf));
eexec_string(line);
sprintf(line, "%s ", cs_start);
eexec_string(line);
for (bp = charstring_buf; bp < charstring_bp; bp++)
eexec_byte(*bp);
} | 0 | [
"CWE-119",
"CWE-787"
] | t1utils | 6b9d1aafcb61a3663c883663eb19ccdbfcde8d33 | 294,487,965,846,999,700,000,000,000,000,000,000,000 | 11 | Security fixes.
- Don't overflow the small cs_start buffer (reported by Niels
Thykier via the debian tracker (Jakub Wilk), found with a
fuzzer ("American fuzzy lop")).
- Cast arguments to <ctype.h> functions to unsigned char. |
void tmx_pretran_link_safe(int slotid)
{
if(_tmx_proc_ptran==NULL)
return;
if(_tmx_ptran_table[slotid].plist==NULL) {
_tmx_ptran_table[slotid].plist = _tmx_proc_ptran;
_tmx_proc_ptran->linked = 1;
return;
}
_tmx_proc_ptran->next = _tmx_ptran_table[slotid].plist;
_tmx_ptran_table[slotid].plist->prev = _tmx... | 0 | [
"CWE-119",
"CWE-79",
"CWE-787"
] | kamailio | e1d8008a09d9390ebaf698abe8909e10dfec4097 | 271,774,639,952,276,430,000,000,000,000,000,000,000 | 16 | tmx: allocate space to store ending 0 for branch value
- reported by Alfred Farrugia and Sandro Gauci |
static int dlpar_parse_id_type(char **cmd, struct pseries_hp_errorlog *hp_elog)
{
char *arg;
u32 count, index;
arg = strsep(cmd, " ");
if (!arg)
return -EINVAL;
if (sysfs_streq(arg, "indexed-count")) {
hp_elog->id_type = PSERIES_HP_ELOG_ID_DRC_IC;
arg = strsep(cmd, " ");
if (!arg) {
pr_err("No DRC cou... | 0 | [
"CWE-476"
] | linux | efa9ace68e487ddd29c2b4d6dd23242158f1f607 | 319,664,379,625,194,240,000,000,000,000,000,000,000 | 70 | powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup().
kstrdup() may return NULL, so it should be checked and handle error.
And prop should be freed if 'prop->name' is NULL.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signe... |
static void opj_j2k_write_coc_in_memory(opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
opj_event_mgr_t * p_manager
... | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | 4241ae6fbbf1de9658764a80944dc8108f2b4154 | 193,581,908,205,945,500,000,000,000,000,000,000,000 | 49 | Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985) |
void ext4_ext_drop_refs(struct ext4_ext_path *path)
{
int depth, i;
if (!path)
return;
depth = path->p_depth;
for (i = 0; i <= depth; i++, path++) {
brelse(path->p_bh);
path->p_bh = NULL;
}
} | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 78,830,027,666,588,520,000,000,000,000,000,000,000 | 12 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
xstrpisotime(const char *s, char **endptr)
{
/** like strptime() but strictly for ISO 8601 Zulu strings */
struct tm tm;
time_t res = (time_t)-1;
/* make sure tm is clean */
memset(&tm, 0, sizeof(tm));
/* as a courtesy to our callers, and since this is a non-standard
* routine, we skip leading whitespace */
w... | 0 | [
"CWE-415",
"CWE-787"
] | libarchive | 9c84b7426660c09c18cc349f6d70b5f8168b5680 | 312,316,112,934,855,400,000,000,000,000,000,000,000 | 52 | warc: consume data once read
The warc decoder only used read ahead, it wouldn't actually consume
data that had previously been printed. This means that if you specify
an invalid content length, it will just reprint the same data over
and over and over again until it hits the desired length.
This means that a WARC res... |
Status AuthorizationManager::getUserDescription(OperationContext* txn,
const UserName& userName,
BSONObj* result) {
return _externalState->getUserDescription(txn, userName, result);
} | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 291,526,900,102,777,780,000,000,000,000,000,000,000 | 5 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
flatpak_remote_state_lookup_sparse_cache (FlatpakRemoteState *self,
const char *ref,
VarMetadataRef *out_metadata,
GError **error)
{
VarSummaryRef summary;
VarMetadata... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 142,759,479,324,691,050,000,000,000,000,000,000,000 | 54 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
static void save_vsx(struct task_struct *tsk)
{
if (tsk->thread.regs->msr & MSR_FP)
save_fpu(tsk);
if (tsk->thread.regs->msr & MSR_VEC)
save_altivec(tsk);
} | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 1,201,862,858,879,878,500,000,000,000,000,000,000 | 7 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
static void __netdev_adjacent_dev_remove(struct net_device *dev,
struct net_device *adj_dev,
u16 ref_nr,
struct list_head *dev_list)
{
struct netdev_adjacent *adj;
pr_debug("Remove adjacency: dev %s adj_dev %s ref_nr %d\n",
dev->name, adj_dev->name, ref_nr);
adj = __netdev_find_adj(adj_dev, d... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 224,901,797,072,329,620,000,000,000,000,000,000,000 | 39 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
static long wsgi_alias_matches(const char *uri, const char *alias_fakename)
{
/* Code for this function from Apache mod_alias module. */
const char *aliasp = alias_fakename, *urip = uri;
while (*aliasp) {
if (*aliasp == '/') {
/* any number of '/' in the alias matches any number in
... | 0 | [
"CWE-254"
] | mod_wsgi | 545354a80b9cc20d8b6916ca30542eab36c3b8bd | 108,854,656,849,225,170,000,000,000,000,000,000,000 | 40 | When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state. |
static void disk_alloc_events(struct gendisk *disk)
{
struct disk_events *ev;
if (!disk->fops->check_events)
return;
ev = kzalloc(sizeof(*ev), GFP_KERNEL);
if (!ev) {
pr_warn("%s: failed to initialize events\n", disk->disk_name);
return;
}
INIT_LIST_HEAD(&ev->node);
ev->disk = disk;
spin_lock_init(&ev-... | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 277,017,168,485,834,300,000,000,000,000,000,000,000 | 23 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
void Magick::Image::page(const Magick::Geometry &pageSize_)
{
modifyImage();
options()->page(pageSize_);
image()->page=pageSize_;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 23,599,945,420,553,326,000,000,000,000,000,000,000 | 6 | Added missing return to avoid use after free. |
static inline int ext4_handle_has_enough_credits(handle_t *handle, int needed)
{
if (ext4_handle_valid(handle) && handle->h_buffer_credits < needed)
return 0;
return 1;
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 234,153,898,656,423,370,000,000,000,000,000,000,000 | 6 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
bool CModules::OnUserMsg(CString& sTarget, CString& sMessage) {
MODHALTCHK(OnUserMsg(sTarget, sMessage));
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 52,042,245,441,397,870,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
_cdf_tole2(uint16_t sv)
{
uint16_t rv;
uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv));
uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv));
d[0] = s[1];
d[1] = s[0];
return rv;
} | 0 | [
"CWE-787"
] | file | 46a8443f76cec4b41ec736eca396984c74664f84 | 213,332,044,962,741,900,000,000,000,000,000,000,000 | 9 | Limit the number of elements in a vector (found by oss-fuzz) |
int bcf_has_filter(const bcf_hdr_t *hdr, bcf1_t *line, char *filter)
{
if ( filter[0]=='.' && !filter[1] ) filter = "PASS";
int id = bcf_hdr_id2int(hdr, BCF_DT_ID, filter);
if ( !bcf_hdr_idinfo_exists(hdr,BCF_HL_FLT,id) ) return -1; // not defined in the header
if ( !(line->unpacked & BCF_UN_FLT) ) bc... | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 193,820,774,462,553,230,000,000,000,000,000,000,000 | 14 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
void CLASS lossy_dng_load_raw()
{
#ifdef LIBRAW_LIBRARY_BUILD
if (!image)
throw LIBRAW_EXCEPTION_IO_CORRUPT;
#endif
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
JSAMPARRAY buf;
JSAMPLE(*pixel)[3];
unsigned sorder = order, ntags, opcode, deg, i, j, c;
unsigned save = data_offset - 4... | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 21,554,022,973,510,725,000,000,000,000,000,000,000 | 102 | parse_qt: possible integer overflow |
const char *am_cache_env_fetch_first(am_cache_entry_t *t,
const char *var)
{
const char *str;
int i;
for (i = 0; i < t->size; i++) {
str = am_cache_entry_get_string(t, &t->env[i].varname);
if (str == NULL)
break;
if (strcmp(str, var) ... | 0 | [
"CWE-79"
] | mod_auth_mellon | 7af21c53da7bb1de024274ee6da30bc22316a079 | 156,306,037,451,717,880,000,000,000,000,000,000,000 | 16 | Fix Cross-Site Session Transfer vulnerability
mod_auth_mellon did not verify that the site the session was created
for was the same site as the site the user accessed. This allows an
attacker with access to one web site on a server to use the same
session to get access to a different site running on the same server.
... |
static inline int save_general_regs(struct pt_regs *regs,
struct mcontext __user *frame)
{
elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
int i;
WARN_ON(!FULL_REGS(regs));
for (i = 0; i <= PT_RESULT; i ++) {
if (i == 14 && !FULL_REGS(regs))
i = 32;
if (__put_user((unsigned int)gregs[i], &frame->mc_gregs[i])... | 0 | [
"CWE-20",
"CWE-284",
"CWE-369"
] | linux | d2b9d2a5ad5ef04ff978c9923d19730cb05efd55 | 210,907,316,244,657,600,000,000,000,000,000,000,000 | 16 | powerpc/tm: Block signal return setting invalid MSR state
Currently we allow both the MSR T and S bits to be set by userspace on
a signal return. Unfortunately this is a reserved configuration and
will cause a TM Bad Thing exception if attempted (via rfid).
This patch checks for this case in both the 32 and 64 bit s... |
void PrintLiveUsage()
{
u32 i=0;
gf_sys_format_help(helpout, help_flags, "# Live Scene Encoder Options\n"
"The options shall be specified as `opt_name=opt_val.\n"
"Options:\n"
"\n"
);
while (m4b_liveenc_args[i].name) {
GF_GPACArg *arg = (GF_GPACArg *) &m4b_liveenc_args[i];
i++;
gf_s... | 0 | [
"CWE-787"
] | gpac | 4e56ad72ac1afb4e049a10f2d99e7512d7141f9d | 15,527,147,465,274,680,000,000,000,000,000,000,000 | 26 | fixed #2216 |
int sctp_cmp_addr_exact(const union sctp_addr *ss1,
const union sctp_addr *ss2)
{
struct sctp_af *af;
af = sctp_get_af_specific(ss1->sa.sa_family);
if (unlikely(!af))
return 0;
return af->cmp_addr(ss1, ss2);
} | 0 | [
"CWE-287"
] | linux-2.6 | add52379dde2e5300e2d574b172e62c6cf43b3d3 | 209,342,827,272,940,240,000,000,000,000,000,000,000 | 11 | sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
If INIT-ACK is received with SupportedExtensions parameter which
indicates that the peer does not support AUTH, the packet will be
silently ignore, and sctp_process_init() do cleanup all of the
transports in the association.
When T1-Init timer is ex... |
gs_window_reset_background_surface (GSWindow *window)
{
cairo_pattern_t *pattern;
pattern = cairo_pattern_create_for_surface (window->priv->background_surface);
gdk_window_set_background_pattern (gtk_widget_get_window (GTK_WIDGET (window)),
pattern);
... | 0 | [
"CWE-284"
] | cinnamon-screensaver | da7af55f1fa966c52e15cc288d4f8928eca8cc9f | 93,941,940,567,230,820,000,000,000,000,000,000,000 | 9 | Workaround gtk3 bug, don't allow GtkWindow to handle popup_menu. |
void set_geometry_type(uint type)
{ Type_geometry_attributes::set_geometry_type(type); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 146,796,006,521,446,200,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
struct kvm_sregs *sregs)
{
vcpu_load(vcpu);
memcpy(&vcpu->run->s.regs.acrs, &sregs->acrs, sizeof(sregs->acrs));
memcpy(&vcpu->arch.sie_block->gcr, &sregs->crs, sizeof(sregs->crs));
vcpu_put(vcpu);
return 0;
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 229,940,534,478,517,700,000,000,000,000,000,000,000 | 11 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
ethertype_print(netdissect_options *ndo,
u_short ether_type, const u_char *p,
u_int length, u_int caplen,
const struct lladdr_info *src, const struct lladdr_info *dst)
{
switch (ether_type) {
case ETHERTYPE_IP:
ip_print(ndo, p, length);
return (1);
case ET... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 258,122,773,114,790,850,000,000,000,000,000,000,000 | 134 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
bool smb1cli_conn_server_writeunlock(struct smbXcli_conn *conn)
{
return conn->smb1.server.writeunlock;
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 229,208,515,914,505,170,000,000,000,000,000,000,000 | 4 | 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> |
virtual bool ms_can_fast_dispatch_any() const { return false; } | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 160,164,959,684,919,040,000,000,000,000,000,000,000 | 1 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
ar6000_configure_target(struct ar6_softc *ar)
{
u32 param;
if (enableuartprint) {
param = 1;
if (BMIWriteMemory(ar->arHifDevice,
HOST_INTEREST_ITEM_ADDRESS(ar, hi_serial_enable),
(u8 *)¶m,
4)!= 0)
{
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 251,153,215,017,353,630,000,000,000,000,000,000,000 | 171 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static void svm_set_vintr(struct vcpu_svm *svm)
{
struct vmcb_control_area *control;
/*
* The following fields are ignored when AVIC is enabled
*/
WARN_ON(kvm_vcpu_apicv_activated(&svm->vcpu));
svm_set_intercept(svm, INTERCEPT_VINTR);
/*
* This is just a dummy VINTR to actually cause a vmexit to happen.
... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 23,183,531,718,485,100,000,000,000,000,000,000,000 | 22 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
PJ_DEF(pj_status_t) pjmedia_rtcp_get_ntp_time(const pjmedia_rtcp_session *sess,
pjmedia_rtcp_ntp_rec *ntp)
{
/* Seconds between 1900-01-01 to 1970-01-01 */
#define JAN_1970 (2208988800UL)
pj_timestamp ts;
pj_status_t status;
status = pj_get_timestamp(&ts);
/* Fill up the high 32bit part */... | 0 | [
"CWE-125"
] | pjproject | 8b621f192cae14456ee0b0ade52ce6c6f258af1e | 165,833,343,828,424,630,000,000,000,000,000,000,000 | 77 | Merge pull request from GHSA-3qx3-cg72-wrh9 |
int perf_event_init_context(struct task_struct *child, int ctxn)
{
struct perf_event_context *child_ctx, *parent_ctx;
struct perf_event_context *cloned_ctx;
struct perf_event *event;
struct task_struct *parent = current;
int inherited_all = 1;
unsigned long flags;
int ret = 0;
if (likely(!parent->perf_event_ct... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 224,850,689,789,694,440,000,000,000,000,000,000,000 | 91 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
static struct rmap_item *scan_get_next_rmap_item(struct page **page)
{
struct mm_struct *mm;
struct mm_slot *slot;
struct vm_area_struct *vma;
struct rmap_item *rmap_item;
if (list_empty(&ksm_mm_head.mm_list))
return NULL;
slot = ksm_scan.mm_slot;
if (slot == &ksm_mm_head) {
/*
* A number of pages can h... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 2b472611a32a72f4a118c069c2d62a1a3f087afd | 139,760,727,682,557,810,000,000,000,000,000,000,000 | 130 | ksm: fix NULL pointer dereference in scan_get_next_rmap_item()
Andrea Righi reported a case where an exiting task can race against
ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily
triggering a NULL pointer dereference in ksmd.
ksm_scan.mm_slot == &ksm_mm_head with only one registered mm
CPU 1... |
static int __cache_free_alien(struct kmem_cache *cachep, void *objp,
int node, int page_node)
{
struct kmem_cache_node *n;
struct alien_cache *alien = NULL;
struct array_cache *ac;
LIST_HEAD(list);
n = get_node(cachep, node);
STATS_INC_NODEFREES(cachep);
if (n->alien && n->alien[page_node]) {
alien = n->a... | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 320,388,991,733,717,860,000,000,000,000,000,000,000 | 30 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
char *converse(pam_handle_t *pamh, int echocode, const char *prompt) {
const struct pam_message msg = {.msg_style = echocode, .msg = (char *)prompt};
const struct pam_message *msgs = &msg;
struct pam_response *resp = NULL;
int retval = _converse(pamh, 1, &msgs, &resp);
char *ret = NULL;
if (retval != PAM_S... | 0 | [
"CWE-200"
] | pam-u2f | 18b1914e32b74ff52000f10e97067e841e5fff62 | 62,816,199,872,691,690,000,000,000,000,000,000,000 | 27 | Do not leak file descriptor when doing exec
When opening a custom debug file, the descriptor would stay
open when calling exec and leak to the child process.
Make sure all files are opened with close-on-exec.
This fixes CVE-2019-12210.
Thanks to Matthias Gerstner of the SUSE Security Team for reporting
the issue. |
_pango_ot_info_get_layout (PangoOTInfo *info)
{
return info->layout;
} | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 266,471,568,233,486,320,000,000,000,000,000,000,000 | 4 | [HB] Remove all references to the old code! |
ExecutionStatus Interpreter::caseDirectEval(
Runtime *runtime,
PinnedHermesValue *frameRegs,
const Inst *ip) {
auto *result = &O1REG(DirectEval);
auto *input = &O2REG(DirectEval);
GCScopeMarkerRAII gcMarker{runtime};
// Check to see if global eval() has been overriden, in which case call it as
/... | 0 | [
"CWE-670",
"CWE-703"
] | hermes | b2021df620824627f5a8c96615edbd1eb7fdddfc | 251,940,655,603,174,900,000,000,000,000,000,000,000 | 58 | 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... |
static unsigned fill_bitbuffer(STATE_PARAM unsigned bitbuffer, unsigned *current, const unsigned required)
{
while (*current < required) {
if (bytebuffer_offset >= bytebuffer_size) {
unsigned sz = bytebuffer_max - 4;
if (to_read >= 0 && to_read < sz) /* unzip only */
sz = to_read;
/* Leave the first 4 b... | 0 | [
"CWE-476"
] | busybox | 1de25a6e87e0e627aa34298105a3d17c60a1f44e | 117,145,974,569,850,240,000,000,000,000,000,000,000 | 25 | unzip: test for bad archive SEGVing
function old new delta
huft_build 1296 1300 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
static void get_pi_state(struct futex_pi_state *pi_state)
{
WARN_ON_ONCE(!refcount_inc_not_zero(&pi_state->refcount));
} | 0 | [
"CWE-416"
] | tip | 8019ad13ef7f64be44d4f892af9c840179009254 | 291,042,825,374,034,900,000,000,000,000,000,000,000 | 4 | futex: Fix inode life-time issue
As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.
This sequence number is global, but shared (file backed) futexes are
rare enough that thi... |
static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
{
if (dmamask == DMA_BIT_MASK(30))
return B43_DMA_30BIT;
if (dmamask == DMA_BIT_MASK(32))
return B43_DMA_32BIT;
if (dmamask == DMA_BIT_MASK(64))
return B43_DMA_64BIT;
B43_WARN_ON(1);
return B43_DMA_30BIT;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 159,306,838,054,264,590,000,000,000,000,000,000,000 | 11 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.